[TIMOB-27525] Commented out line with Ti.include in it causes LiveView failure
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2020-06-17T13:28:39.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 9.1.0 |
Components | LiveView |
Labels | n/a |
Reporter | Ray Belisle |
Assignee | Ebenezer Boateng |
Created | 2019-10-25T13:33:15.000+0000 |
Updated | 2020-06-17T13:28:39.000+0000 |
Description
On any project, add the following line:
//Ti.include('vendor/pubnub.js');
Make sure the line is *COMMENTED OUT* with the single line prefix *//*. Compile the app with LiveView turned on. The file load will fail. Remove the line and save, the file will load without issue.
It seems that somehow, LiveView is ignoring the fact the line is commented out and trying to process the 'include' function, causing the error.
If you surround by a multi line comment like this instead, then it works.
/*Ti.include('vendor/pubnub.js');*/
This looks to be some bad code in liveview where it tries to handle Ti.include calls but doesn't ignore commented out code causing the try/catch it's wrapped it to get borked (the multi-line comment is self contained so that's why it doesn't break) anything. Moving to TIMOB, thanks for the report [~raybelisle]
https://github.com/appcelerator/liveview/pull/134
Removing from current sprint as this will only be testable once we update liveview in the SDK, when we do that we can pull this ticket back into the sprint for qe
*Closing ticket* fix verified in SDK version
9.1.0.v20200615121135
. Able to still use liveview when having ati.include
commented out e.g.*Test Environment*