Skip to content

Commit

Permalink
fix setAll for undefined properties
Browse files Browse the repository at this point in the history
  • Loading branch information
trosck committed Jan 12, 2023
1 parent 3edc57d commit e9487fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ export class URLParams implements IURLParams {
) {
for (const key in properties) {
if (properties.hasOwnProperty(key)) {
this._url.searchParams.set(key, properties[key].toString())
this._url.searchParams.set(
key, properties[key]?.toString?.() ?? ""
)
}
}
changeUrl(this._url, saveState)
Expand Down

0 comments on commit e9487fe

Please sign in to comment.