Преглед на файлове

dont load dependencies if there are none

Rodja Trappe преди 2 години
родител
ревизия
ae7d3f94f5
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      nicegui/routes.py

+ 2 - 1
nicegui/routes.py

@@ -66,7 +66,8 @@ def add_dependencies(py_filepath: str, dependencies: List[str] = []) -> None:
     if py_filepath in globals.dependencies:
         return
     globals.dependencies[py_filepath] = dependencies
-
+    if not dependencies:
+        return
     vue_filepath = os.path.splitext(os.path.realpath(py_filepath))[0] + '.js'
 
     for dependency in dependencies: