Skip to content

Commit 657e2e5

Browse files
committed
check if is URL first
1 parent c91f4a5 commit 657e2e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

idom/client/module.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ def __init__(
8888
)
8989
if check_exports:
9090
self._export_names = manage.web_module_exports(url_or_name)
91+
elif _is_url(url_or_name):
92+
self.url = url_or_name
9193
elif manage.web_module_exists(url_or_name):
9294
self.url = manage.web_module_url(url_or_name)
9395
if check_exports:
9496
self._export_names = manage.web_module_exports(url_or_name)
95-
elif _is_url(url_or_name):
96-
self.url = url_or_name
9797
else:
9898
raise ValueError(f"{url_or_name!r} is not installed or is not a URL")
9999
self.exports = {name: self.declare(name) for name in (self._export_names or [])}

0 commit comments

Comments
 (0)