Merge pull request #13272 from netchampfaris/bundled-asset-abs-url

fix: Make bundled asset URL absolute always
This commit is contained in:
mergify[bot] 2021-05-20 15:15:45 +00:00 committed by GitHub
commit ad5778275d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)