[TIMOB-4825] Require / Exports file will crash if comments are at the end
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2011-11-10T14:18:10.000+0000 |
| Affected Version/s | Release 1.7.2 |
| Fix Version/s | Release 1.8.0.1 |
| Components | iOS |
| Labels | n/a |
| Reporter | Rick Blalock |
| Assignee | Blain Hamon |
| Created | 2011-07-28T19:18:20.000+0000 |
| Updated | 2011-12-07T15:57:17.000+0000 |
Description
If you leave a comment at the bottom of a file included using require(), a parse error happens.
exports.blah = function(value) {
return value;
};
// Test
If you take //Test comment out - it works fine.
Error:
[INFO] Application started
[DEBUG] reading stylesheet from: /Users/rickblalock/Library/Application Support/iPhone Simulator/4.3.2/Applications/F556303E-D2FA-4E79-BE62-58C03927B1A4/fishrules.app/stylesheet.plist
[INFO] fishrules/1.0 (1.8.0.67ca940)
[DEBUG] Analytics is enabled = YES
[DEBUG] loading: /Users/rickblalock/svn_repos/fishrules/Resources/app.js, resource: Users/rickblalock/svn_repos/fishrules/Resources/app_js
[DEBUG] loading: /Users/rickblalock/svn_repos/fishrules/Resources/modules/core.js, resource: Users/rickblalock/svn_repos/fishrules/Resources/modules/core_js
[ERROR] Script Error = {
line = 8;
message = "Parse error";
name = SyntaxError;
sourceId = 200399776;
}
2011-07-28 22:11:16.300 fishrules[30267:1ea07] *** Terminating app due to uncaught exception of class '__NSCFDictionary'
terminate called throwing an exception
Closing bug. Verified fix on KS using the following environment: OS: Mac OS X Lion Titanium Studio, build: 1.0.7.201112061404 SDK build: 1.8.0.1.v20111207151125 Device: iphone 4S Sprint (5.0.1)