Address issue #1746

This will have the side effect of breaking loading image dicts from
older Janet versions with these contents.
This commit is contained in:
Calvin Rose committed 2026-05-08 18:42:50 -05:00
1 parent 27807d4456
commit bef6cb5d74
1 file changed
+3 -1
+3 -1
View File
@@ -4953,7 +4953,9 @@
# Build dictionary for loading images
(def load-dict (env-lookup root-env))
(each [k v] (pairs load-dict)
(if (number? v) (put load-dict k nil)))
# Drop simple types, otherwise we get odd issues when loading foreign data from a different Janet version.
# It also doesn't usually save any space to encode these anyway.
(if (or (string? v) (keyword? v) (number? v)) (put load-dict k nil)))
(merge-into load-image-dict load-dict)
(def image