Skip to content

Commit c462dd6

Browse files
authored
Merge branch 'main' into matrix
2 parents 792933f + b0b0dc7 commit c462dd6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/pages-components/src/components/address/methods.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
const sampleAddress: AddressType = {
1212
city: "New York",
1313
countryCode: "US",
14-
line1: "60 W 23rd St",
14+
line1: "60 W 23rd St #1",
1515
postalCode: "10010",
1616
region: "NY",
1717
};
@@ -61,7 +61,7 @@ describe("getDirections()", () => {
6161
provider: MapProviderOption.APPLE,
6262
})
6363
).toEqual(
64-
"https://maps.apple.com/?address=60%20W%2023rd%20St,%20New%20York,%20NY,%2010010,%20US"
64+
"https://maps.apple.com/?address=60%20W%2023rd%20St%20%231%2C%20New%20York%2C%20NY%2C%2010010%2C%20US"
6565
);
6666
});
6767

@@ -71,7 +71,7 @@ describe("getDirections()", () => {
7171
provider: MapProviderOption.BING,
7272
})
7373
).toEqual(
74-
"https://bing.com/maps/default.aspx?where1=60%20W%2023rd%20St,%20New%20York,%20NY,%2010010"
74+
"https://bing.com/maps/default.aspx?where1=60%20W%2023rd%20St%20%231%2C%20New%20York%2C%20NY%2C%2010010"
7575
);
7676
});
7777

@@ -82,13 +82,13 @@ describe("getDirections()", () => {
8282
route: true,
8383
})
8484
).toEqual(
85-
"https://bing.com/maps/default.aspx?rtp=adr.60%20W%2023rd%20St,%20New%20York,%20NY,%2010010"
85+
"https://bing.com/maps/default.aspx?rtp=adr.60%20W%2023rd%20St%20%231%2C%20New%20York%2C%20NY%2C%2010010"
8686
);
8787
});
8888

8989
it("returns URL to Google Maps address query", () => {
9090
expect(getDirections(sampleAddress)).toEqual(
91-
"https://maps.google.com/maps/search/?api=1&query=60%20W%2023rd%20St,%20New%20York,%20NY,%2010010,%20US"
91+
"https://maps.google.com/maps/search/?api=1&query=60%20W%2023rd%20St%20%231%2C%20New%20York%2C%20NY%2C%2010010%2C%20US"
9292
);
9393
});
9494

@@ -98,7 +98,7 @@ describe("getDirections()", () => {
9898
route: true,
9999
})
100100
).toEqual(
101-
"https://maps.google.com/maps/dir/?api=1&destination=60%20W%2023rd%20St,%20New%20York,%20NY,%2010010,%20US"
101+
"https://maps.google.com/maps/dir/?api=1&destination=60%20W%2023rd%20St%20%231%2C%20New%20York%2C%20NY%2C%2010010%2C%20US"
102102
);
103103
});
104104

packages/pages-components/src/components/address/methods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,5 @@ const encodeArray = (substrings: (string | undefined)[] = []): string => {
220220
if (!substrings.length) return "";
221221

222222
const str = substrings.filter(Boolean).join(", ");
223-
return encodeURI(str);
223+
return encodeURIComponent(str);
224224
};

0 commit comments

Comments
 (0)