We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
@early-start
1 parent ae79e6a commit 76e85b9Copy full SHA for 76e85b9
1 file changed
src/app/service/service_worker/runtime.ts
@@ -354,13 +354,14 @@ export class RuntimeService {
354
// 如果是后台脚本, 在offscreen中进行处理
355
// 脚本类别不会更改
356
if (script.type === SCRIPT_TYPE_NORMAL) {
357
+ const isCurrentEarlyStart = this.earlyScriptFlags.has(uuid);
358
const isEarlyStart = isEarlyStartScript(script.metadata);
359
if (isEarlyStart && enable) {
360
this.earlyScriptFlags.add(uuid);
361
} else {
362
this.earlyScriptFlags.delete(uuid);
363
}
- if (isEarlyStart) {
364
+ if (isEarlyStart || isCurrentEarlyStart !== isEarlyStart) {
365
needReRegisterInjectJS = true;
366
367
// 加载页面脚本
0 commit comments