Skip to content

Commit

Permalink
cant lazy load only. Has to be a property of the exported thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos authored and James Halliday committed May 9, 2013
1 parent d22deba commit c5a4731
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions index.js
Expand Up @@ -17,14 +17,17 @@ var nextTick = typeof setImmediate !== 'undefined'
exports = module.exports = (function () {
var harness;
var lazyLoad = function () {
if (!harness) {
harness = createExitHarness();
lazyLoad.only = harness.only;
}
if (!harness) harness = createExitHarness();

return harness.apply(this, arguments);
};

lazyLoad.only = function () {
if (!harness) harness = createExitHarness();

return harness.only.apply(this, arguments);
}

return lazyLoad
})();

Expand Down

0 comments on commit c5a4731

Please sign in to comment.