melhorias
This commit is contained in:
parent
7fae4d43e5
commit
97184ef169
5 changed files with 9 additions and 7 deletions
3
dist/tipagemRotas.js
vendored
3
dist/tipagemRotas.js
vendored
|
|
@ -49,7 +49,8 @@ class TipagemRotas {
|
|||
endereco(query, usarComoHash) {
|
||||
const url = new URL(typeof window !== "undefined" ? window.location.href : "http://localhost");
|
||||
url.pathname = this.caminho;
|
||||
const queryKeys = typeof query == "object" && query ? Object.entries(query) : [[query, ""]];
|
||||
url.search = "";
|
||||
const queryKeys = Object.entries(query);
|
||||
for (const [key, value] of queryKeys) {
|
||||
url.searchParams.set(String(key), value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue