File tree Expand file tree Collapse file tree
nx/public/plugins/quick-edit/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ function removeQuickEditParam ( ) {
2+ const url = new URL ( window . location ) ;
3+ url . searchParams . delete ( 'quick-edit' ) ;
4+ window . history . replaceState ( { } , '' , url ) ;
5+ }
6+
17export function pollConnection ( ctx , action ) {
28 ctx . initialized = false ;
39 let count = 0 ;
@@ -18,6 +24,7 @@ async function handlePreview(ctx) {
1824 if ( e . data . type === 'preview' ) {
1925 ctx . port . removeEventListener ( 'message' , previewListener ) ;
2026 if ( e . data . ok ) {
27+ removeQuickEditParam ( ) ;
2128 window . location . reload ( ) ;
2229 } else {
2330 // eslint-disable-next-line no-alert
@@ -45,6 +52,7 @@ export function setupActions(ctx) {
4552
4653 // Create exit button
4754 const exitButton = createButton ( 'quick-edit-exit' , 'Exit' , ( ) => {
55+ removeQuickEditParam ( ) ;
4856 window . location . reload ( ) ;
4957 } ) ;
5058 exitButton . style . display = 'none' ;
You can’t perform that action at this time.
0 commit comments