Skip to content

Commit becb9a1

Browse files
Added a replace function to remove any trailing slashes on the prefix (url).
1 parent f046d38 commit becb9a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export const asset = (path) => {
77
prefix = document.head.querySelector('meta[name="asset-url"]').content
88
}
99

10-
return prefix + '/' + path.replace(/^\/+/, '')
10+
return prefix.replace(/\/+$/, '') + '/' + path.replace(/^\/+/, '')
1111
}

0 commit comments

Comments
 (0)