diff options
Diffstat (limited to 'script/core/command/autoRequire.lua')
-rw-r--r-- | script/core/command/autoRequire.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/core/command/autoRequire.lua b/script/core/command/autoRequire.lua index a96cc918..9f3ff929 100644 --- a/script/core/command/autoRequire.lua +++ b/script/core/command/autoRequire.lua @@ -132,6 +132,7 @@ end ---@async return function (data) + ---@type uri local uri = data.uri local target = data.target local name = data.name @@ -158,5 +159,7 @@ return function (data) end local offset, fmt = findInsertRow(uri) - applyAutoRequire(uri, offset, name, requireName, fmt) + if offset and fmt then + applyAutoRequire(uri, offset, name, requireName, fmt) + end end |