@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.
@@ -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.startsWith('C:/')) {
974
+ } else if (isWindowsPath(relativePath)) {
972
975
  webViewRoot = relativePath;
973
976
  } else {
974
977
  webViewRoot = root + relativePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/iframe-worker",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "Web Worker to manage creation and lifecycle of iframes in Lvce Editor",
5
5
  "main": "dist/iframeWorkerMain.js",
6
6
  "type": "module",