From c3e1cd04388189ea0dd68102896555fd19ff9c1f Mon Sep 17 00:00:00 2001 From: MCorange Date: Sun, 18 Aug 2024 03:43:01 +0300 Subject: [PATCH] :33333 --- keypadOS.lua | 6 +++++- x.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/keypadOS.lua b/keypadOS.lua index 2e31f55..f257662 100644 --- a/keypadOS.lua +++ b/keypadOS.lua @@ -1,7 +1,11 @@ local __BUNDLER_FILES = {} local __DEFAULT_IMPORT = require local require = function(path) - return __BUNDLER_FILES[path]() or __DEFAULT_IMPORT(path) + if __BUNDLER_FILES[path] then + return __BUNDLER_FILES[path]() + else + __DEFAULT_IMPORT(path) + end end __BUNDLER_FILES["updater.lua"] = function () diff --git a/x.py b/x.py index 860a740..80b96d8 100755 --- a/x.py +++ b/x.py @@ -25,7 +25,11 @@ def main(): buf += "local __BUNDLER_FILES = {}\n"; buf += "local __DEFAULT_IMPORT = require\n"; buf += "local require = function(path)\n"; - buf += " return __BUNDLER_FILES[path]() or __DEFAULT_IMPORT(path)\n"; + buf += " if __BUNDLER_FILES[path] then\n"; + buf += " return __BUNDLER_FILES[path]()\n"; + buf += " else\n"; + buf += " __DEFAULT_IMPORT(path)\n"; + buf += " end\n"; buf += "end\n"; for file in FILES: