From a30519df4bfb6e0b880a3a34436f0526ec5adb87 Mon Sep 17 00:00:00 2001 From: evanvosberg Date: Thu, 22 Jul 2021 14:50:27 +0300 Subject: [PATCH] Fix order of release modules. --- grunt/tasks/modularize.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/grunt/tasks/modularize.js b/grunt/tasks/modularize.js index 0fc3b46..228e9ae 100644 --- a/grunt/tasks/modularize.js +++ b/grunt/tasks/modularize.js @@ -55,7 +55,15 @@ module.exports = function (grunt) { .uniq() .without(name) .sort((a, b) => { - return options[a].components.indexOf(b) === -1 ? -1 : 1; + if (options[a].components.includes(b)) { + return 1 + } + + if (options[b].components.includes(a)) { + return -1 + } + + return 0; }) .value();