Merge pull request #13272 from netchampfaris/bundled-asset-abs-url
fix: Make bundled asset URL absolute always
This commit is contained in:
commit
ad5778275d
1 changed files with 5 additions and 4 deletions
|
|
@ -81,9 +81,10 @@ def include_style(path):
|
|||
|
||||
def bundled_asset(path):
|
||||
from frappe.utils import get_assets_json
|
||||
from frappe.website.utils import abs_url
|
||||
|
||||
if path.startswith("/assets") or ".bundle." not in path:
|
||||
return path
|
||||
if ".bundle." in path and not path.startswith("/assets"):
|
||||
bundled_assets = get_assets_json()
|
||||
path = bundled_assets.get(path) or path
|
||||
|
||||
bundled_assets = get_assets_json()
|
||||
return bundled_assets.get(path) or path
|
||||
return abs_url(path)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue