From 2233fa82fb2f9dc6051cdf64d0bc9b6150b94998 Mon Sep 17 00:00:00 2001 From: Joel Chen Date: Wed, 29 Apr 2020 10:28:26 -0700 Subject: [PATCH] handle getInitialState for queued subapp starts (#1632) --- packages/subapp-web/src/subapp-web.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/subapp-web/src/subapp-web.js b/packages/subapp-web/src/subapp-web.js index 641389d9f..ad9a0ea07 100644 --- a/packages/subapp-web/src/subapp-web.js +++ b/packages/subapp-web/src/subapp-web.js @@ -210,6 +210,12 @@ options._genId = options.name + "_inst_id_" + runtimeInfo.instId++; } + // + // check and retrieve initialState. + // + if (options.getInitialState) { + options.initialState = options.getInitialState(); + } if (options.group) { // start subapps as a group const grpInfo = runtimeInfo.groups[options.group];