Avoid trying to `require` an unregistered `View` module
This commit is contained in:
parent
ef0c093a61
commit
7cabc4032c
|
@ -90,7 +90,7 @@ local function load_view(t)
|
||||||
t.type = nil
|
t.type = nil
|
||||||
return class.from_content and class.from_content(t)
|
return class.from_content and class.from_content(t)
|
||||||
end
|
end
|
||||||
return require(t.module)() -- FIXME: is this needed? If a class is not registered, it should not be loaded
|
core.error("Could not restore view %q", t.type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue