Skip to content

Commit 851f8b1

Browse files
committed
remove optional chaining operators for plugin compliance
1 parent 353508d commit 851f8b1

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

  • src/Resources
    • app/administration/src/module/frosh-tools/component/frosh-tools-tab-feature-flags
    • public/administration/js

src/Resources/app/administration/src/module/frosh-tools/component/frosh-tools-tab-feature-flags/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ Component.register('frosh-tools-tab-feature-flags', {
7070
window.location.reload();
7171
})
7272
.catch((error) => {
73-
this.createNotificationError({
74-
message: error?.response?.data?.errors[0]?.detail
75-
});
73+
try {
74+
this.createNotificationError({
75+
message: error.response.data.errors[0].detail
76+
});
77+
}
78+
catch (e) {
79+
console.error(error);
80+
}
7681
this.isLoading = false;
7782
});
7883
}

src/Resources/public/administration/js/frosh-tools.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)