fixed callback removal

This commit is contained in:
flash 2016-12-23 20:17:29 +01:00
parent 3e4c3c878a
commit 096bfab18a

View file

@ -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];
}
}