ibm-js / delite

HTML Custom Element / Widget infrastructure
http://ibm-js.github.io/delite/
Other
68 stars 28 forks source link

delite/features uses window and it is breaking the build. #401

Closed clmath closed 9 years ago

clmath commented 9 years ago

This is the same issue as https://github.com/ibm-js/delite/issues/241.

The line here features#L22 should be modified to check if window exist before using it or be wrapped in a function like at features#L24 since function for has tests won't be evaluated at build time.

Another solution would be to wrap all the browser only tests in a if statement like it is done in deliteful/features.

wkeese commented 9 years ago

Thanks, I'll fix.

clmath commented 9 years ago

Actually the fix is not good. There is a typo in the condition here https://github.com/ibm-js/delite/commit/4b3b33f39281bc3c490730a2479c221f0542e0a4#diff-31269337867008f33aa993b7b50c3a3eR12

It should be typeof window !== "undefined".

I think we will have to release a 0.7.1 with the fix and then proceed with the build.