mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Merge pull request #102 from xoob/patch-1
Fix invalid regex in getWorkerUrl
This commit is contained in:
commit
8cd0490d1e
1 changed files with 1 additions and 1 deletions
|
|
@ -197,7 +197,7 @@ function createLoaderRules(languages: IFeatureDefinition[], features: IFeatureDe
|
|||
getWorkerUrl: function (moduleId, label) {
|
||||
var pathPrefix = ${pathPrefix};
|
||||
var result = (pathPrefix ? stripTrailingSlash(pathPrefix) + '/' : '') + paths[label];
|
||||
if (/^((http:)|(https:)|(file:)|(\/\/))/.test(result)) {
|
||||
if (/^((http:)|(https:)|(file:)|(\\/\\/))/.test(result)) {
|
||||
var currentUrl = String(window.location);
|
||||
var currentOrigin = currentUrl.substr(0, currentUrl.length - window.location.hash.length - window.location.search.length - window.location.pathname.length);
|
||||
if (result.substring(0, currentOrigin.length) !== currentOrigin) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue