Opened 10 years ago

Closed 10 years ago

#15024 closed defect (worksforme)

AMD require: loading a generic script that ends with comment breaks loader

Reported by: Simon Speich Owned by: Rawld Gill
Priority: high Milestone: 1.7.3
Component: Loader Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


When loading a generic script in sync mode that ends with a comment, the loader genereates an error:

missing } after function body @ sourceURL=/class/js/TableSort.js

var dojoConfig = {
	async: false,
	baseUrl: '',
require(['/class/TableSort.js'], function() {
   var tbl = new TableSort();

// Begin file TableSort.js

   function TableSort(tbl) { ... }
   TableSort.prototype.init = function() {  ... };
   // comment at end of js file

// End of js file

@see also

If I remove the comment or set async = true, the script loads without an error.

Change History (2)

comment:1 Changed 10 years ago by Rawld Gill

Milestone: tbd1.7.3
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 10 years ago by Rawld Gill

Resolution: worksforme
Status: assignedclosed

I tried to duplicate...

trunk and the CND address shown FF and IE 8,9 comment with and without a newline

and I never saw a failure. If you still have this problem, please tell me your browser and attach files.

Note: See TracTickets for help on using tickets.