dsh-unlag 1.9.73 → 1.9.74

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.
Files changed (2) hide show
  1. package/client.js +20 -6
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -354,17 +354,31 @@ window.__ModuleLoader__.load({
354
354
  let frozen = null;
355
355
  for (const row of rows) {
356
356
  if (row === null || typeof row !== 'object') continue;
357
- if (typeof row.kind !== 'string' || !STARTUP_ROW_KINDS.has(row.kind)) return held('row');
357
+ // The saved list crosses a boundary from the shell: a row whose fields cannot be read is a
358
+ // list this page cannot vouch for, and naming the row beats a page-shaped notice.
359
+ let kind = '';
360
+ let runs = false;
361
+ let src = '';
362
+ let name = '';
363
+ let value = null;
364
+ try {
365
+ kind = typeof row.kind === 'string' ? row.kind : '';
366
+ runs = kind === 'script-src' || kind === 'script-preload';
367
+ src = typeof row.src === 'string' ? row.src : '';
368
+ name = typeof row.name === 'string' ? row.name : '';
369
+ value = row.value;
370
+ } catch {
371
+ return held('row');
372
+ }
373
+ if (!STARTUP_ROW_KINDS.has(kind)) return held('row');
358
374
  // Only the rows a document runs as scripts have to load as classic scripts. Style and
359
375
  // markup rows carry their own text and their address is not a script at all, so reading
360
376
  // them back would refuse a sound list over a false alarm.
361
- const runs = row.kind === 'script-src' || row.kind === 'script-preload';
362
- if (runs && (typeof row.src !== 'string' || row.src === '')) return held('src');
363
- if (runs) scripts.push(row.src);
377
+ if (runs && src === '') return held('src');
378
+ if (runs) scripts.push(src);
364
379
  // Inline rows carry their own text and are not fetched; the queue script among them ends
365
380
  // in a nested return that a flat scan would misread, so their text is left to the document.
366
- if (row.kind !== 'global' || row.name !== '__DSH_BOOT__') continue; // ui-copy-ignore
367
- let value = row.value;
381
+ if (kind !== 'global' || name !== '__DSH_BOOT__') continue; // ui-copy-ignore
368
382
  if (typeof value === 'string') {
369
383
  try {
370
384
  value = JSON.parse(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-unlag",
3
- "version": "1.9.73",
3
+ "version": "1.9.74",
4
4
  "type": "module",
5
5
  "description": "A press applies plugin edits right away and brings a laggy interface back; automatic reloading stays off unless you turn it on, so the press is the only trigger, and nothing restarts.",
6
6
  "license": "MIT",