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.
Hi, thanks for the cool library!
Recently faced an unobvious problem
Current Behavior
When adding a library using gulp.js (concatenate many scripts into one file), I get the error Cannot set property 'lozad' of undefined, the error was in this line of code (global.lozad = factory()); global was undefined
although when loading via cdn - there are no errors
Possible Solution
I added a simple check (global = global || self, global.lozad = factory()); and everything worked as expected
Please pay attention
P.S. You've got a cool tool
The text was updated successfully, but these errors were encountered:
Hi, thanks for the cool library!
Recently faced an unobvious problem
Current Behavior
When adding a library using gulp.js (concatenate many scripts into one file), I get the error
Cannot set property 'lozad' of undefined
, the error was in this line of code(global.lozad = factory());
global was undefinedalthough when loading via cdn - there are no errors
Possible Solution
I added a simple check
(global = global || self, global.lozad = factory());
and everything worked as expectedPlease pay attention
P.S. You've got a cool tool
The text was updated successfully, but these errors were encountered: