optional chaining

This commit is contained in:
Henry Jameson 2026-08-04 15:59:52 +03:00
commit cf85b00c0a
26 changed files with 34 additions and 34 deletions

View file

@ -74,7 +74,7 @@ export const useAnnouncementsStore = defineStore('announcements', {
} catch (error) {
// If and only if backend does not support announcements, it would return 404.
// In this case, silently ignores it.
if (error && error.statusCode === 404) {
if (error?.statusCode === 404) {
this.supportsAnnouncements = false
} else {
throw error

View file

@ -790,7 +790,7 @@ export const normalizeThemeData = (input) => {
// New theme presets don't have 'theme' property, they use 'source'
let out // shout, shout let it all out
if (themeSource && themeSource.themeEngineVersion === CURRENT_VERSION) {
if (themeSource?.themeEngineVersion === CURRENT_VERSION) {
// There are some themes in wild that have completely broken source
out = { ...(themeData || {}), ...themeSource }
} else {