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
Backbone currently breaks in 'strict' mode while trying to access properties on the global object. The global object is being set using the (function(root) { ... })(this) pattern. However, in this case, root remains undefined and hence the issue.
Using the Function("return this")() pattern instead alleviates the issue, though arguably ugly. Thoughts?
Steps to reproduce: Import backbone in a babel-jest test harness. (uses strict mode)
The text was updated successfully, but these errors were encountered:
Backbone currently breaks in
'strict'
mode while trying to access properties on the global object. The global object is being set using the(function(root) { ... })(this)
pattern. However, in this case,root
remainsundefined
and hence the issue.Using the
Function("return this")()
pattern instead alleviates the issue, though arguably ugly. Thoughts?Steps to reproduce: Import backbone in a
babel-jest
test harness. (uses strict mode)The text was updated successfully, but these errors were encountered: