1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Return undefined instead of null

This commit is contained in:
Ted John
2022-03-24 23:33:07 +00:00
parent 372606ab9a
commit 6863fb1ecb

View File

@@ -88,7 +88,7 @@ namespace OpenRCT2::Scripting
auto& scriptEngine = GetContext()->GetScriptEngine();
auto plugin = scriptEngine.GetExecInfo().GetCurrentPlugin();
auto range = AllocateCustomImages(plugin, count);
return range ? CreateImageIndexRange(range->BaseId, range->Count) : ToDuk(_ctx, nullptr);
return range ? CreateImageIndexRange(range->BaseId, range->Count) : ToDuk(_ctx, undefined);
}
void free(const DukValue& dukRange)