Skip to content

Commit cd2249f

Browse files
fix: support da admin source urls in library (#745)
1 parent 34fac8c commit cd2249f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

blocks/edit/da-library/da-library.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,13 @@ class DaLibrary extends LitElement {
544544
try {
545545
const itemUrl = new URL(getUrl(item));
546546
path = itemUrl.pathname;
547+
548+
// DA Admin Flavored URLs
549+
if (itemUrl.origin.endsWith('admin.da.live') && path.startsWith('/source')) {
550+
path = path.replace('/source', '');
551+
}
552+
553+
// AEM Flavored URLs
547554
if (itemUrl.origin.includes('--')) {
548555
const [org, site] = getEdsUrlVars(getUrl(item));
549556
path = `/${org}/${site}${itemUrl.pathname}`;

0 commit comments

Comments
 (0)