Skip to content

Commit 11f621d

Browse files
committed
fix(#1999): links should work regardless of host (again again)
1 parent 9cce7fe commit 11f621d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/dev/docs/src/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function DocSearch() {
251251
if (key) {
252252
let prediction = predictions.find(prediction => key === prediction.objectID);
253253
let url = prediction.url;
254-
window.location.href = `${window.location.hostname === 'reactspectrum.blob.core.windows.net' ? window.location.href.replace(/(.+\/docs)(.+)/, '$1') : '/'}${url.replace('https://react-spectrum.adobe.com/', '')}`;
254+
window.location.href = `${window.location.hostname === 'reactspectrum.blob.core.windows.net' ? window.location.href.replace(/(.+\/docs\/)(.+)/, '$1') : '/'}${url.replace('https://react-spectrum.adobe.com/', '')}`;
255255
}
256256
};
257257

0 commit comments

Comments
 (0)