Index: pkg/browser/lib/dart.js |
diff --git a/pkg/browser/lib/dart.js b/pkg/browser/lib/dart.js |
index bf60f52cc0f53be9a7bf74855d34f0dbfe34d3e7..ee339de7287d5f3e479e5bd7e3f424c6f1600886 100644 |
--- a/pkg/browser/lib/dart.js |
+++ b/pkg/browser/lib/dart.js |
@@ -25,7 +25,7 @@ if (navigator.webkitStartDart) { |
// Remap foo.dart to foo.dart.js. |
if (scripts[i].src && scripts[i].src != '') { |
var script = document.createElement('script'); |
- script.src = scripts[i].src + '.js'; |
+ script.src = scripts[i].src.replace(/\.dart(?=\?|$)/, '.dart.js'); |
var parent = scripts[i].parentNode; |
parent.replaceChild(script, scripts[i]); |
} |