From b9f0316f766cf2b263d583d3c55abc67896e731d Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 24 Aug 2019 21:16:42 +0800 Subject: [PATCH] [+] Wait for isAssignmentReady() --- src/components/app/app.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/app/app.ts b/src/components/app/app.ts index d9f3919..955cfa2 100644 --- a/src/components/app/app.ts +++ b/src/components/app/app.ts @@ -4,6 +4,7 @@ import Navigation from '@/components/navigation/navigation'; import Overall from '@/pages/overall/overall'; import Constants from '@/constants'; import JsonUtils from '@/utils/json-utils'; +import pWaitFor from 'p-wait-for'; /** * Objects of this interface represent assignment grades. @@ -81,6 +82,13 @@ export default class App extends Vue alert(err); }); }); + + // Wait for assignments to be ready. + pWaitFor(() => this.isAssignmentsReady()).then(() => + { + // When the assignments are ready + this.assignmentsReady = true; + }); } /**