diff options
| author | unwox <me@unwox.com> | 2024-09-27 15:34:16 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-09-27 15:34:16 +0600 |
| commit | a97422981b1dfb0eff8d36836cb0777a5ecb90ad (patch) | |
| tree | 93f0654ee8c2504dd9be6557e6722ac8ef6d9ddd /lua.go | |
| parent | 81a1002523eb7ac78fb2a55e070e7058ca31c0e0 (diff) | |
return error when failing to recursively push an array or object onto the stack
Diffstat (limited to 'lua.go')
| -rw-r--r-- | lua.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -186,10 +186,10 @@ func (l *Lua) PushAny(v any) error { l.PushFloatNumber(v) case map[string]any: v, _ := v.(map[string]any) - l.PushObject(v) + return l.PushObject(v) case []any: v, _ := v.([]any) - l.PushArray(v) + return l.PushArray(v) case time.Time: v, _ := v.(time.Time) l.PushString(v.Format(time.DateTime)) |
