Commit 09754ff7 authored by Jie Yuan's avatar Jie Yuan
Browse files

make the back functions correct

parent d4f1447f
......@@ -122,16 +122,17 @@ export class SiteService {
getCurrentSelectedSite() {
if (this.currentSelectedSite !== null && this.currentSelectedSite !== undefined) {
return this.currentSelectedSite;
} else {
const tmp = sessionStorage.getItem('currentSelectedSite');
if ( tmp !== null && tmp !== '' && tmp !== undefined) {
this.currentSelectedSite = JSON.parse(tmp);
return this.currentSelectedSite;
}
sessionStorage.setItem('currentSelectedSite', JSON.stringify(this.currentSelectedSite));
this.currentSelectedSite = null;
}
const tmp = sessionStorage.getItem('currentSelectedSite');
if ( tmp !== null && tmp !== '' && tmp !== undefined) {
return JSON.parse(tmp);
}
}
/**
* Returns true if the user can enter to the dashboard/site url
* @returns {boolean}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment