Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use foo = null instead of delete foo where appropriate

  • Loading branch information...
commit a3a73936ec211b3cf6896cff3ce16b55a6a483b2 1 parent d93461e
@marcuswestin authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  ListPromise.js
  2. +1 −1  Promise.js
  3. +2 −2 blockFunction.js
View
2  ListPromise.js
@@ -38,7 +38,7 @@ module.exports = proto(null,
for (var i=0; i<this._callbacks.length; i++) {
this._notify(this._callbacks[i])
}
- delete this._callbacks
+ this._callbacks = null
},
_notify: function(callback) {
callback(this._error, !this._error && this._results)
View
2  Promise.js
@@ -21,7 +21,7 @@ module.exports = Class(function() {
if (this.fulfillment) { throw new Error('Promise fulfilled twice') }
this.fulfillment = slice(arguments)
each(this._dependants, invokeWith.apply(this, this.fulfillment))
- delete this._dependants
+ this._dependants = null
return this
}
View
4 blockFunction.js
@@ -32,12 +32,12 @@ module.exports = function blockFunction(fn) {
if (!numBlocks) { throw new Error("Tried to remove a block that was never added") }
if (--numBlocks) { return }
fn(null)
- delete fn
+ fn = null
return this
},
fail:function(error) {
fn(error)
- delete fn
+ fn = null
return this
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.