Skip to content

Commit 38ceacf

Browse files
committed
Explicitly load base field.lua before other field files
Added explicit include of field.lua before IncludeDir to ensure proper load order. This guarantees that the Field base class is defined before other field types (like ChoiceField) try to extend it, preventing "nil value" errors.
1 parent 720de66 commit 38ceacf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scen_edit/view/view.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ end
235235
function View:InitializeChili()
236236
-- Original Chili initialization
237237
-- Load Chili field system first (required by other views)
238+
-- Explicitly load base field file first to ensure it's available
239+
SB.Include(Path.Join(SB.DIRS.SRC, 'view/fields/field.lua'))
240+
-- Then load all other fields
238241
SB.IncludeDir(Path.Join(SB.DIRS.SRC, 'view/fields'))
239242

240243
SB.IncludeDir(Path.Join(SB.DIRS.SRC, 'view'))

0 commit comments

Comments
 (0)