fix(web): themes inside editors urls
This commit is contained in:
@@ -292,7 +292,7 @@ describe('featuresService', () => {
|
||||
const component = nativeComponent()
|
||||
const url = manager.urlForComponent(component)
|
||||
const feature = FindNativeFeature(component.identifier) as FeatureDescription
|
||||
expect(url).toEqual(`components/assets/${component.identifier}/${feature.index_path}`)
|
||||
expect(url).toEqual(`http://localhost/components/assets/${component.identifier}/${feature.index_path}`)
|
||||
})
|
||||
|
||||
it('returns hosted path for third party component', () => {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user