element.content["name"] causes an error if it doesn't exist

it would be very helpful if this would return nil instead of causing a critical error. allowing checking if an element is (still) registered in frameworks

it's possible to get the element that way if it exists, so you'd expect that this syntax returns nil if it doesn't

[00:57:25.525 E] L@0x1[cf_scripts/cf_p.lua] onConsoleCommand failed. Lua error: [string "E:\SteamLibrary\steamapps\common\OpenMW\0.51..."]:36: Unexpected content key:mainFlex2

[00:57:25.525 E] stack traceback:

[00:57:25.525 E] [C]: in function 'error'

[00:57:25.525 E] [string "E:\SteamLibrary\steamapps\common\OpenMW\0.51..."]:36: in function 'getIndexFromKey'

[00:57:25.525 E] [string "E:\SteamLibrary\steamapps\common\OpenMW\0.51..."]:78: in function '__index'

[00:57:25.525 E] [string "cf_recipes/_artisanstouch.lua"]:96: in function 'func'

[00:57:25.525 E] [string "cf_scripts/ui_craftingwindow.lua"]:2326: in function 'loader'

[00:57:25.525 E] [string "..."]:17: in function 'require'

[00:57:25.525 E] [string "cf_scripts/cf_p.lua"]:985: in function 'openCraftingWindow'

[00:57:25.525 E] [string "cf_scripts/cf_p.lua"]:1138: in function <[string "cf_scripts/cf_p.lua"]:1107>

Edited by Ownly Me