From 388736c56c52ab942c53988854479f325399b63d Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 7 Apr 2022 16:04:05 +0100 Subject: [PATCH] [RequireNative] Reverse find order to check new modules over old for U2 --- src/utils/requireNative.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/requireNative.js b/src/utils/requireNative.js index 47f7de6..7902345 100644 --- a/src/utils/requireNative.js +++ b/src/utils/requireNative.js @@ -3,4 +3,4 @@ // For Module Updater: get root path for all modules in globalPaths const g = require('module').globalPaths; -module.exports = (n, e = '') => require(require('path').join(g.find(x => x.includes(n)) ?? g[0], n, e)); \ No newline at end of file +module.exports = (n, e = '') => require(require('path').join(g.reverse().find(x => x.includes(n)) ?? g[0], n, e));