| @@ -1,4 +1,5 @@ | ||
| 1 | +(function() { | |
| 1 | 2 | "use strict"; |
| 2 | 3 | var wp; |
| 3 | 4 | (wp ||= {}).router = (() => { |
| 4 | 5 | var __create = Object.create; |
| @@ -1000,9 +1001,9 @@ | ||
| 1000 | 1001 | const query = (0, import_url.getQueryArgs)(rawPath); |
| 1001 | 1002 | const path = (0, import_url.getPath)("http://domain.com/" + rawPath) ?? ""; |
| 1002 | 1003 | const performPush = () => { |
| 1003 | 1004 | const result = beforeNavigate ? beforeNavigate({ path, query }) : { path, query }; |
| 1004 | - return history.push( | |
| 1005 | + return history[options.replace ? "replace" : "push"]( | |
| 1005 | 1006 | { |
| 1006 | 1007 | search: (0, import_url.buildQueryString)({ |
| 1007 | 1008 | [pathArg]: result.path, |
| 1008 | 1009 | ...result.query |
| @@ -1182,6 +1183,8 @@ | ||
| 1182 | 1183 | useLink, |
| 1183 | 1184 | Link |
| 1184 | 1185 | }); |
| 1185 | 1186 | return __toCommonJS(index_exports); |
| 1187 | +})(); | |
| 1188 | +(window.wp ||= {}).router = wp.router; | |
| 1186 | 1189 | })(); |
| 1187 | 1190 | //# sourceMappingURL=index.js.map |