Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Jul 21, 2021
1 parent 941569e commit 7203caa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nicegui/elements/custom_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def add_page(self, wp: jp.WebPage):
else:
wp.head_html += f'<script src="lib/{dependency}"></script>\n'
filepath = f'{os.path.dirname(self.vue_filepath)}/lib/{dependency}'
jp.app.routes.insert(0, Route(f'/lib/{dependency}', lambda _: FileResponse(filepath)))
route = Route(f'/lib/{dependency}', lambda _, filepath=filepath: FileResponse(filepath))
jp.app.routes.insert(0, route)

if self.vue_filepath not in jp.component_file_list:
filename = os.path.basename(self.vue_filepath)
Expand Down

0 comments on commit 7203caa

Please sign in to comment.