From 096bfab18ae4c0f8f32498d9344bee2cebdc03a3 Mon Sep 17 00:00:00 2001 From: flashwave Date: Fri, 23 Dec 2016 20:17:29 +0100 Subject: [PATCH] fixed callback removal --- resources/assets/typescript/Sakura/AJAX.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]; } }