1
0
mirror of https://github.com/janet-lang/janet synced 2026-05-19 03:42:14 +00:00

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
2026-05-08 18:15:15 -05:00
parent 27807d4456
commit bef6cb5d74
+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