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 alert ( e . data . error ) ;
@@ -44,6 +51,7 @@ export function setupActions(ctx) {
4451
4552 // Create exit button
4653 const exitButton = createButton ( 'quick-edit-exit' , 'Exit' , ( ) => {
54+ removeQuickEditParam ( ) ;
4755 window . location . reload ( ) ;
4856 } ) ;
4957 exitButton . style . display = 'none' ;
You can’t perform that action at this time.
0 commit comments