You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varinstance;functioninit(){// Init instance};return{getInstance: function(){if(!instance){// With beefy, this is always undefinedinstance=init();}returninstance;}};
However, using beefy as a build tool I've encountered a significant bug; The value of the variable instance is not being conserved between require calls. I've tested the standard Browserify build and it seems to work properly.
What could be causing this behaviour ?
The text was updated successfully, but these errors were encountered:
Hello,
I'm working with a modular application where I'm using a singleton as described in the singleton pattern by Addy osmani but without the Closure since it's already handled by Browserify.
However, using beefy as a build tool I've encountered a significant bug; The value of the variable instance is not being conserved between require calls. I've tested the standard Browserify build and it seems to work properly.
What could be causing this behaviour ?
The text was updated successfully, but these errors were encountered: