[Notebook] Link to snapshot should not be a fully qualified url #3445 (#3576)

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
Nikhil 2020-12-11 09:41:35 -08:00 committed by GitHub
parent 52fab78625
commit 06a6a3f773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,9 @@ export default {
this.openmct.notifications.alert(message);
}
window.location.hash = hash;
const relativeHash = hash.slice(hash.indexOf('#'));
const url = new URL(relativeHash, `${location.protocol}//${location.host}${location.pathname}`);
window.location.hash = url.hash;
},
formatTime(unixTime, timeFormat) {
return Moment.utc(unixTime).format(timeFormat);