mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(resource): throw an error if the UI is not built
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
-- Creates exports from values assigned to lib
|
||||
-- Hacky workaround for Lua Language Server support
|
||||
--- Alias for `exports.ox_lib`
|
||||
|
||||
lib = setmetatable({}, {
|
||||
__newindex = function(self, name, fn)
|
||||
exports(name, fn)
|
||||
@@ -9,9 +5,6 @@ lib = setmetatable({}, {
|
||||
end
|
||||
})
|
||||
|
||||
function lib.setClipboard(value)
|
||||
SendNUIMessage({
|
||||
action = 'setClipboard',
|
||||
data = value
|
||||
})
|
||||
end
|
||||
if not LoadResourceFile('ox_lib', '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')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user