fix(web): themes inside editors urls

This commit is contained in:
Mo
2022-07-07 16:16:47 -05:00
parent dc48b504db
commit 3d49b95bc5
2 changed files with 3 additions and 2 deletions

View File

@@ -285,7 +285,8 @@ export class SNComponentManager extends AbstractService<ComponentManagerEvent, E
if (!isWeb) {
throw Error('Mobile must override urlForComponent to handle native paths')
}
return `components/assets/${component.identifier}/${nativeFeature.index_path}`
const baseUrlRequiredForThemesInsideEditors = window.location.origin
return `${baseUrlRequiredForThemesInsideEditors}/components/assets/${component.identifier}/${nativeFeature.index_path}`
}
let url = component.hosted_url || component.legacy_url