Skip to content

Commit

Permalink
fix: make enabled false when file protocol used
Browse files Browse the repository at this point in the history
  • Loading branch information
bokuweb committed Aug 17, 2024
1 parent 921b3e1 commit f39667f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const regData = (window as any)['__reg__'] as RegData;
const workerClient = new WorkerClient();
const ximgdiffConfig = regData.ximgdiffConfig || { enabled: false };

// INFO: set false on file: protocol
// ref: https://github.com/reg-viz/reg-cli/issues/506
if (window.location.protocol.startsWith('file')) {
ximgdiffConfig.enabled = false;
}

workerClient.start(ximgdiffConfig);

// Store
Expand Down

0 comments on commit f39667f

Please sign in to comment.