Skip to content

Commit f7b4cfb

Browse files
Assign thunk to null instead of using delete
delete causes V8 to change the object representation to a more inefficient one. Fixes #15.
1 parent 32d8d0c commit f7b4cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Data/Lazy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports.defer = function () {
1616

1717
Defer.prototype.force = function () {
1818
var value = this.thunk();
19-
delete this.thunk;
19+
this.thunk = null;
2020
this.force = function () {
2121
return value;
2222
};

0 commit comments

Comments
 (0)