File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/components/custom-widget/ko Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -21,5 +21,11 @@ export class CustomWidgetViewModel {
2121 this . src = ko . observable ( ) ;
2222 this . styles = ko . observable ( ) ;
2323 this . instanceId = ko . observable ( ) ;
24+
25+ window . addEventListener ( "hashchange" , ( ) => {
26+ const srcNew = new URL ( this . src ( ) ) ;
27+ srcNew . hash = window . location . hash ;
28+ this . src ( srcNew . toString ( ) ) ;
29+ } ) ;
2430 }
2531}
Original file line number Diff line number Diff line change @@ -34,5 +34,7 @@ export async function buildWidgetSource(
3434 } ;
3535 url . searchParams . append ( APIM_EDITOR_DATA_KEY , encodeURIComponent ( JSON . stringify ( data ) ) ) ;
3636
37- return { override : developmentSrc , src : url . toString ( ) } ;
37+ const src = url . toString ( ) + window . location . hash ;
38+
39+ return { override : developmentSrc , src} ;
3840}
You can’t perform that action at this time.
0 commit comments