Skip to content

Commit a97c679

Browse files
committed
fix(utilities): Correct reversed deprecation warning condition
Closes #2265
1 parent fa70301 commit a97c679

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

core/utilities/init.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -861,18 +861,16 @@ function utilities.stripContentPos (content)
861861
end
862862

863863
function utilities._avoid_base_class_use (obj)
864-
if type(obj) == "table" and obj._name and obj._name ~= "base" then
864+
if type(obj) == "table" and obj._name and obj._name == "base" then
865865
local type_group = "SILE." .. obj.type .. "s"
866866
SU.deprecated(type_group .. ".base", type_group .. ".default", "0.15.11", "0.16.0")
867867
end
868868
end
869869

870-
-- On demand loader, allows modules to be loaded into a specific scope but
871-
-- only when/if accessed.
870+
-- On demand loader, allows modules to be loaded into a specific scope only if/when accessed
872871
function utilities._module_loader (scope)
873872
return setmetatable({}, {
874873
__index = function (self, key)
875-
-- local var = rawget(self, key)
876874
local m = require(("%s.%s"):format(scope, key))
877875
self[key] = m
878876
return m

0 commit comments

Comments
 (0)