web/satellite: fix promise usages
Change-Id: I6496ebdd57667e8222b2bfbe6174860997b6bb3f
This commit is contained in:
parent
6e660cecdd
commit
09e1ff7fc4
@ -31,7 +31,11 @@ export default class App extends Vue {
|
||||
*/
|
||||
public mounted(): void {
|
||||
const satelliteName = MetaUtils.getMetaContent('satellite-name');
|
||||
const partneredSatellitesJson = JSON.parse(MetaUtils.getMetaContent('partnered-satellites'));
|
||||
const partneredSatellitesData = MetaUtils.getMetaContent('partnered-satellites');
|
||||
let partneredSatellitesJson = [];
|
||||
if(partneredSatellitesData) {
|
||||
partneredSatellitesJson = JSON.parse(partneredSatellitesData);
|
||||
}
|
||||
const isBetaSatellite = MetaUtils.getMetaContent('is-beta-satellite');
|
||||
const couponCodeBillingUIEnabled = MetaUtils.getMetaContent('coupon-code-billing-ui-enabled');
|
||||
const couponCodeSignupUIEnabled = MetaUtils.getMetaContent('coupon-code-signup-ui-enabled');
|
||||
|
@ -50,8 +50,9 @@ export default class NavigationArea extends Vue {
|
||||
* Lifecycle hook before initial render.
|
||||
* Sets navigation side bar list.
|
||||
*/
|
||||
public async beforeMount(): Promise<void> {
|
||||
if (await JSON.parse(MetaUtils.getMetaContent('file-browser-flow-disabled'))) {
|
||||
public beforeMount(): void {
|
||||
const value = MetaUtils.getMetaContent('file-browser-flow-disabled');
|
||||
if (value === "true") {
|
||||
this.navigation = [
|
||||
RouteConfig.ProjectDashboard.withIcon(DashboardIcon),
|
||||
RouteConfig.AccessGrants.withIcon(AccessGrantsIcon),
|
||||
|
@ -22,7 +22,8 @@ export default class ObjectsArea extends Vue {
|
||||
* Redirects if flow is disabled.
|
||||
*/
|
||||
public async mounted(): Promise<void> {
|
||||
if (await JSON.parse(MetaUtils.getMetaContent('file-browser-flow-disabled'))) {
|
||||
const value = MetaUtils.getMetaContent('file-browser-flow-disabled');
|
||||
if (value === "true") {
|
||||
await this.$router.push(RouteConfig.ProjectDashboard.path);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user