-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Howdy! I'm enjoying moonshine, thank you!
I see that several files use the idiom:
'use strict'
var shine = shine || {};
In Chrome, this results in:
var shine; // implicitly undefined
shine = shine || {}; // ... therefore always {}
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:
- Remove 'use strict'.
- 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!
Metadata
Metadata
Assignees
Labels
No labels