Open bmcbarron opened 7 years ago
Hi,
Sorry for not picking this up sooner. Thanks for the spot!
I see you've fixed it in your fork. I agree that option 2 is the best solution; if you'd like to create a pull request, I'd be pleased to merge it back upstream.
Regards, Paul.
Howdy! I'm enjoying moonshine, thank you!
I see that several files use the idiom:
In Chrome, this results in:
Thus, you can't use this technique to augment the same object (e.g. including moonshine.js and distillery.moonshine.js together).
This is further confused because in moonshine.js, 'use strict' is not the first line of code, so it actually has no effect. Things sometimes work as intended, depending on the exact mechanism used to include those two files.
I verified two possible ways of fixing this: 1) Remove 'use strict'. 1) Use
var shine = this.shine = this.shine || {};
If you pursue the second case, I recommend moving
'use strict';
to the top of moonshine.js, to get the intended effect.Cheers, and thanks again!