Skip to content

Commit 9792215

Browse files
committed
fix: guard MutationObserver write and pin release-drafter target-commitish
1 parent 8be7849 commit 9792215

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/release-drafter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name-template: "v$RESOLVED_VERSION"
22
tag-template: "v$RESOLVED_VERSION"
3+
target-commitish: main
34
categories:
45
- title: "✨ Features"
56
labels: ["✨ enhancement", "feat"]

srcs/Preflight.App/wwwroot/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,17 @@
229229
if (len > 0) html.style.setProperty('--pf-trail-length-px', `${len}px`);
230230
} catch { /* getTotalLength can throw on detached / pre-layout SVG */ }
231231
}
232+
let _lastTrailProgress = null;
232233
const syncTrail = () => {
233234
const raw = html.style.getPropertyValue('--blazor-load-percentage')
234235
|| getComputedStyle(html).getPropertyValue('--blazor-load-percentage');
235236
if (!raw) return;
236237
const num = parseFloat(raw);
237-
if (!Number.isNaN(num)) html.style.setProperty('--pf-trail-progress', String(num));
238+
if (Number.isNaN(num)) return;
239+
const next = String(num);
240+
if (next === _lastTrailProgress) return;
241+
_lastTrailProgress = next;
242+
html.style.setProperty('--pf-trail-progress', next);
238243
};
239244
syncTrail();
240245
const trailObserver = new MutationObserver(syncTrail);

0 commit comments

Comments
 (0)