fixed callback removal
This commit is contained in:
parent
3e4c3c878a
commit
096bfab18a
1 changed files with 2 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue