Fix this shenanigans

This commit is contained in:
Ludovic Stephan 2020-09-15 16:33:41 +02:00
parent 2bc97a115c
commit 11d94ecba8

View file

@ -85,6 +85,7 @@ OpenKfet.prototype = {
toggle_force_close: function (password) {
$.post({
context: this,
url: this.force_close_url,
data: { force_close: !this.force_close },
beforeSend: function ($xhr) {
@ -96,7 +97,7 @@ OpenKfet.prototype = {
.fail(function ($xhr) {
switch ($xhr.status) {
case 403:
requestAuth({'errors': {}}, this.toggle_force_close);
requestAuth({ 'errors': {} }, this.toggle_force_close.bind(this));
break;
}
});