Skip to content

Commit

Permalink
Another small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne committed Oct 29, 2024
1 parent cf725dc commit c7c0e2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion vizro-core/src/vizro/_vizro.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,5 @@ def _make_resource_spec(path: Path) -> _ResourceSpec:
# irrelevant here. The way the file is requested is through a relative url("./fonts/...") in the requesting
# CSS file. When the CSS file is served from the CDN then this will refer to the font file also on the CDN.
resource_spec["dynamic"] = True
print(resource_spec)

return resource_spec
5 changes: 3 additions & 2 deletions vizro-core/src/vizro/models/_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import base64
import logging
from functools import partial
from pathlib import Path
from pathlib import Path, PureWindowsPath
from typing import TYPE_CHECKING, Literal, TypedDict

import dash
Expand Down Expand Up @@ -335,4 +335,5 @@ def _infer_image(filename: str):
if assets_folder.is_dir():
for path in Path(assets_folder).rglob(f"{filename}.*"):
if path.suffix in valid_extensions:
return str(path.relative_to(assets_folder))
# Return path as posix so image source comes out correctly on Windows.
return path.relative_to(assets_folder).as_posix()

0 comments on commit c7c0e2b

Please sign in to comment.