diff --git a/resources/assets/typescript/Sakura/AJAX.ts b/resources/assets/typescript/Sakura/AJAX.ts index e8d4d9d..90c94e1 100644 --- a/resources/assets/typescript/Sakura/AJAX.ts +++ b/resources/assets/typescript/Sakura/AJAX.ts @@ -122,7 +122,7 @@ namespace Sakura // Remove a header public RemoveHeader(name: string): void { - if ((typeof this.Headers[name]).toLowerCase() !== 'undefined') { + if (this.Headers[name]) { delete this.Headers[name]; } } @@ -146,7 +146,7 @@ namespace Sakura // Delete a callback public RemoveCallback(status: number): void { // Delete the callback if present - if ((typeof this.Callbacks[status]).toLowerCase() === 'function') { + if (this.Callbacks[status]) { delete this.Callbacks[status]; } }