Skip to content

Commit b803461

Browse files
committed
fix: bump cache version and use local mip on localhost
1 parent dd22312 commit b803461

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

simulator/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@
166166
-->
167167
<template id="bootstrap-mpy">
168168
import sys
169-
170-
MIP_INDEX = "https://PyDevices.github.io/mip"
169+
from js import window
170+
MIP_INDEX = window.location.origin + "/mip/" if window.location.hostname in ("127.0.0.1", "localhost") else "https://PyDevices.github.io/mip"
171171

172172

173173
def _refresh_environment():

simulator/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
// PyDevices Simulator PWA Service Worker with Cross-Origin Isolation (COI) support.
33

4-
const CACHE_NAME = "pydevices-simulator-v1";
4+
const CACHE_NAME = "pydevices-simulator-v2";
55

66
const PRECACHE_ASSETS = [
77
"./",

0 commit comments

Comments
 (0)