[TIMOB-8071] MobileWeb: require() doesn't cleanup properly after failing to load a module
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-03-18T16:52:42.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.0.0, Sprint 2012-06 |
Components | MobileWeb |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2012-03-17T20:18:53.000+0000 |
Updated | 2017-03-03T23:55:57.000+0000 |
Description
When you do a require("something") and it fails, it returns undefined, which is correct.
The problem is that require() didn't cleanup after that failure, so doing require("something") again will return the string "something" instead of throwing an error again.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/1727 Test by running the following in the console:
All 3 calls should produce errors.
Closing ticket as MobileWeb is no longer supported.