update lib/once.js to match clientside definition

pull/1/head
ansuz 5 years ago
parent 40f302d002
commit a3eff2728e

@ -1,8 +1,7 @@
module.exports = function (f) { module.exports = function (f, g) {
var called;
return function () { return function () {
if (called) { return; } if (!f) { return; }
called = true;
f.apply(this, Array.prototype.slice.call(arguments)); f.apply(this, Array.prototype.slice.call(arguments));
f = g;
}; };
}; };

Loading…
Cancel
Save