graceguo-supercat commented on a change in pull request #11797:
URL: 
https://github.com/apache/incubator-superset/pull/11797#discussion_r530048157



##########
File path: superset-frontend/src/utils/hostNamesConfig.js
##########
@@ -16,15 +16,24 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+import {
+  initFeatureFlags,
+  isFeatureEnabled,
+  FeatureFlag,
+} from 'src/featureFlags';
+
 function getDomainsConfig() {
   const appContainer = document.getElementById('app');
   if (!appContainer) {
     return [];
   }
 
   const bootstrapData = 
JSON.parse(appContainer.getAttribute('data-bootstrap'));
+  // eslint-disable-next-line camelcase
+  initFeatureFlags(bootstrapData?.common?.feature_flags);

Review comment:
       i am not sure...most of places, when we isFeatureEnabled, is after 
initFeatureFlags (which was called in index.jsx). Maybe this module is a little 
special, currently it is loaded before index.jsx. I found this issue only when 
i am working on this PR.
   But it's webpack decide which module loaded first.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to