1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-11 23:36:07 +00:00

Remove resolver element in path tuple.

Try to simplify module/paths back to how it used to be.
This commit is contained in:
Calvin Rose
2019-05-25 17:27:56 -04:00
parent 840610facf
commit 11998b3913
2 changed files with 11 additions and 9 deletions

View File

@@ -20,9 +20,10 @@
(defn- check-http-url
[path]
(or (string/has-prefix? "http://" path)
(string/has-prefix? "https://" path)))
(if (or (string/has-prefix? "http://" path)
(string/has-prefix? "https://" path))
path))
# Add the module loader and path tuple to right places
(array/push module/paths ["HTTP" :janet-http check-http-url identity])
(array/push module/paths [check-http-url :janet-http])
(put module/loaders :janet-http load-url)