Fixed loader task sorting. Opus now working again

canary
WolverinDEV 2019-05-24 22:30:58 +02:00
parent 08603bf831
commit 28695f3004
2 changed files with 3 additions and 2 deletions

View File

@ -76,9 +76,10 @@ namespace loader {
}); });
return; return;
} }
const task_array = tasks[stage] || []; const task_array = tasks[stage] || [];
task_array.push(task); task_array.push(task);
tasks[stage] = task_array.sort((a, b) => a.priority > b.priority ? 1 : 0); tasks[stage] = task_array.sort((a, b) => a.priority - b.priority);
} }
export async function execute() { export async function execute() {

View File

@ -448,6 +448,6 @@ loader.register_task(loader.Stage.JAVASCRIPT_INITIALIZING, {
displayCriticalError("Failed to boot app function:<br>" + ex); displayCriticalError("Failed to boot app function:<br>" + ex);
} }
}, },
priority: 100 priority: 1000
}); });