@lvce-editor/iframe-worker 3.6.1 → 3.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframeWorkerMain.js +4 -1
- package/package.json +1 -1
package/dist/iframeWorkerMain.js
CHANGED
|
@@ -937,6 +937,9 @@ const getWebViewPath = (webViews, webViewId) => {
|
|
|
937
937
|
}
|
|
938
938
|
return webView.path;
|
|
939
939
|
};
|
|
940
|
+
const isWindowsPath = path => {
|
|
941
|
+
return path.startsWith('A:\\') || path.startsWith('B:\\') || path.startsWith('C:\\') || path.startsWith('D:\\') || path.startsWith('E:\\');
|
|
942
|
+
};
|
|
940
943
|
const getWebViewUri = (webViews, webViewId) => {
|
|
941
944
|
const webViewPath = getWebViewPath(webViews, webViewId);
|
|
942
945
|
if (!webViewPath) {
|
|
@@ -968,7 +971,7 @@ const getIframeSrcRemote = (webViews, webViewPort, webViewId, locationProtocol,
|
|
|
968
971
|
if (webViewUri.startsWith('file://')) {
|
|
969
972
|
// ignore
|
|
970
973
|
webViewRoot = webViewUri.slice('file://'.length).replace('/index.html', '');
|
|
971
|
-
} else if (relativePath
|
|
974
|
+
} else if (isWindowsPath(relativePath)) {
|
|
972
975
|
webViewRoot = relativePath;
|
|
973
976
|
} else {
|
|
974
977
|
webViewRoot = root + relativePath;
|