diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/core/diagnostics/assign-type-mismatch.lua | 3 | ||||
-rw-r--r-- | script/core/diagnostics/cast-local-type.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/script/core/diagnostics/assign-type-mismatch.lua b/script/core/diagnostics/assign-type-mismatch.lua index 168106a6..aae4cccb 100644 --- a/script/core/diagnostics/assign-type-mismatch.lua +++ b/script/core/diagnostics/assign-type-mismatch.lua @@ -16,6 +16,9 @@ local checkTypes = { ---@async return function (uri, callback) + if not PREVIEW then + return + end local state = files.getState(uri) if not state then return diff --git a/script/core/diagnostics/cast-local-type.lua b/script/core/diagnostics/cast-local-type.lua index ea14ffb6..0a236084 100644 --- a/script/core/diagnostics/cast-local-type.lua +++ b/script/core/diagnostics/cast-local-type.lua @@ -6,6 +6,9 @@ local await = require 'await' ---@async return function (uri, callback) + if not PREVIEW then + return + end local state = files.getState(uri) if not state then return |