fix(editor): Fix feature flag check when PH is unavailable (#3944)

🐛 Fix feature flag check when PH is unavailable
This commit is contained in:
Iván Ovejero 2022-08-25 15:11:37 +02:00 committed by GitHub
parent a21dbdc45b
commit 93c26dac28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -40,6 +40,7 @@ interface posthog {
callback?: Function,
): unknown;
};
getFeatureFlag?: (flagName: string) => boolean;
}
export interface IUserNodesPanelSession {

View file

@ -2051,7 +2051,12 @@ export default mixins(
this.setZoomLevel(1);
if (window.posthog && !window.featureFlag.isEnabled('show-welcome-note')) return;
if (
window.posthog && window.featureFlag && window.posthog.getFeatureFlag &&
!window.featureFlag.isEnabled('show-welcome-note')
) {
return;
}
setTimeout(() => {
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [0, 0]});