fix trace npe. fix /boot redirect after install
This commit is contained in:
parent
99553f96cc
commit
1f6314512c
3 changed files with 3 additions and 3 deletions
|
|
@ -144,7 +144,7 @@ export function traceHoverUp(int, ev) {
|
||||||
|
|
||||||
export function traceToggle(obj, skip) {
|
export function traceToggle(obj, skip) {
|
||||||
let material = obj.material[0] || obj.material;
|
let material = obj.material[0] || obj.material;
|
||||||
if (!material) return;
|
if (!(material && obj.trace)) return;
|
||||||
let { color, colorSave } = material;
|
let { color, colorSave } = material;
|
||||||
let { widget, poly } = obj.trace;
|
let { widget, poly } = obj.trace;
|
||||||
let areas = env.poppedRec.areas;
|
let areas = env.poppedRec.areas;
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ async function _fetch(e) {
|
||||||
|
|
||||||
if (url.pathname.endsWith("/")) {
|
if (url.pathname.endsWith("/")) {
|
||||||
return e.respondWith(redirectOr404(appendURL(url, 'index.html').pathname));
|
return e.respondWith(redirectOr404(appendURL(url, 'index.html').pathname));
|
||||||
} else if (url.pathname.indexOf(".") < 0) {
|
} else if (url.pathname.indexOf(".") < 0 || url.pathname.endsWith("/boot")) {
|
||||||
return e.respondWith(redirectOr404(appendURL(url, '/index.html').pathname));
|
return e.respondWith(redirectOr404(appendURL(url, '/index.html').pathname));
|
||||||
} else {
|
} else {
|
||||||
e.respondWith(fromCacheOrNetwork(request));
|
e.respondWith(fromCacheOrNetwork(request));
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "Kiri:Moto 4.5.0",
|
"name": "Kiri:Moto 4.5.0",
|
||||||
"short_name": "Kiri:Moto",
|
"short_name": "Kiri:Moto",
|
||||||
"description": "Slicer for 3D printers, CNC mills, laser cutters and more",
|
"description": "Slicer for 3D printers, CNC mills, laser cutters and more",
|
||||||
"start_url": "/boot/",
|
"start_url": "/boot/index.html",
|
||||||
"id": "/kiri/",
|
"id": "/kiri/",
|
||||||
"display": "standalone",
|
"display": "standalone",
|
||||||
"theme_color": "#7e99b7",
|
"theme_color": "#7e99b7",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue