Skip to content

Commit

Permalink
Clean up string
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Jan 24, 2024
1 parent 1c44472 commit 990f27b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions panel/io/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ def bundle_resources(roots, resources, notebook=False, reloading=False, enable_m
elif mode == "server":
for bundle in extensions:
server_url = bundle.server_url
if not isinstance(server_url, str): # Bokeh 3.4.0.dev4 uses bokeh.embed.bundle.URL
server_url = server_url.url
if not isinstance(server_url, str):
server_url = str(server_url)
if resources.root_url and not resources.absolute:
server_url = server_url.replace(resources.root_url, '', 1)
if state.rel_path:
Expand Down Expand Up @@ -601,8 +601,8 @@ def adjust_paths(self, resources):
new_resources = []
cdn_base = f'{config.npm_cdn}/@holoviz/panel@{JS_VERSION}/dist/'
for resource in resources:
if not isinstance(resource, str): # Bokeh 3.4.0.dev4 uses bokeh.embed.bundle.URL
resource = resource.url
if not isinstance(resource, str):
resource = str(resource)
resource = resource.replace('https://unpkg.com', config.npm_cdn)
if resource.startswith(cdn_base):
resource = resource.replace(cdn_base, CDN_DIST)
Expand Down

0 comments on commit 990f27b

Please sign in to comment.