Skip to content

Commit c94cb96

Browse files
author
Prashant.patil
committed
check 2
1 parent c0bed86 commit c94cb96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ export const getThoughtSpotHost = (config: EmbedConfig): string => {
3333
throw new Error(ERROR_MESSAGE.INVALID_THOUGHTSPOT_HOST);
3434
}
3535

36-
const protocol = urlParts[2] || 'https:';
36+
const protocol = urlParts[2] || window?.location?.protocol;
3737
const host = urlParts[3];
3838
let path = urlParts[6];
3939
// Lose the trailing / if any
4040
if (path.charAt(path.length - 1) === '/') {
4141
path = path.substring(0, path.length - 1);
4242
}
43+
// const urlParams = urlParts[7];
44+
// const hash = urlParts[8];
4345
return `${protocol}//${host}${path}`;
4446
};
4547

0 commit comments

Comments
 (0)