1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Ensure unique source maps’ sourceURL; closes #4126

This commit is contained in:
Geoffrey Booth 2017-02-20 15:32:11 -08:00
parent 6f0f173795
commit 7de06c3dcb
2 changed files with 9 additions and 0 deletions

View file

@ -92,11 +92,13 @@
};
source = script.src || script.getAttribute('data-src');
if (source) {
options.filename = source;
return CoffeeScript.load(source, function(param) {
coffees[i] = param;
return execute();
}, options, true);
} else {
options.filename = script.id && script.id !== '' ? script.id : `coffeescript${(i !== 0 ? i : '')}`;
options.sourceFiles = ['embedded'];
return coffees[i] = [script.innerHTML, options];
}