Skip to content

Commit e491c9a

Browse files
committed
Deploy empty.note
1 parent ed3649a commit e491c9a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Assemble site
3939
run: |
4040
mkdir -p _site/pkg
41-
cp web/index.html web/demo.note web/manifest.json web/sw.js web/icon-192.png web/icon-512.png _site/
41+
cp web/index.html web/demo.note web/empty.note web/manifest.json web/sw.js web/icon-192.png web/icon-512.png _site/
4242
mkdir -p _site/share
4343
cp web/share/index.html _site/share/
4444
cp pkg/boox_optimizer{.js,.d.ts,_bg.wasm,_bg.wasm.d.ts} _site/pkg/

web/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,12 @@ <h3 class="font-bold text-gray-900 mb-1 uppercase text-xs tracking-wider">MIT Li
993993
async function handleSvgImport(file) {
994994
const text = await file.text();
995995

996-
// Use empty.note as a blank template for SVG import
996+
// Always start from a fresh empty.note template for SVG import
997997
const res = await fetch('empty.note');
998998
const ab = await res.arrayBuffer();
999999
fileSource = { type: 'demo' };
10001000
await loadBuffer(new Uint8Array(ab));
1001+
if (!app) return;
10011002
filename = file.name.replace('.svg', '');
10021003

10031004
// Show loading indicator and yield so the browser paints it

0 commit comments

Comments
 (0)