From 97c18f0c6b0ca6ddea415918784619ab82e7a280 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 28 Oct 2022 18:26:27 +1100 Subject: [PATCH] refactor(resource): export load error --- resource/main.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resource/main.lua b/resource/main.lua index 283fff6..44d1493 100644 --- a/resource/main.lua +++ b/resource/main.lua @@ -13,5 +13,9 @@ cache = { } if not LoadResourceFile(lib.name, 'web/build/index.html') then - error('Unable to load UI. Build ox_lib or download the latest release.\n ^3https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip^0') + local err = '^1Unable to load UI. Build ox_lib or download the latest release.\n ^3https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip^0' + function lib.hasLoaded() return err end + error(err) end + +function lib.hasLoaded() return true end