Skip to content

Commit

Permalink
Fix JS error on power up #635
Browse files Browse the repository at this point in the history
  • Loading branch information
loleg committed Aug 30, 2024
1 parent 2938ff5 commit 9e83b92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/core/src/views/appDependentComponents/SettingsInner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,11 @@ export default {
this.customStyleEditor = customStyleEditor
},
reloadCustomStyle () {
// Apply custom stylesheets upon saving editor
const linkElement = document.getElementById('customstylelink')
linkElement.setAttribute('href', `/api/appearance-css?t=${Date.now()}`)
if (linkElement) {
linkElement.setAttribute('href', `/api/appearance-css?t=${Date.now()}`)
}
},
newFormReady () {
return this.app.roles && this.app.roles.length > 0 && this.settings !== null
Expand All @@ -279,7 +282,6 @@ export default {
powerUp () {
axios.post('/api/init', { settings: this.settings, user: this.user }).then(res => {
this.reloadCustomStyle()
this.cleanErr()
this.user = res.data
this.$notify({
Expand Down

0 comments on commit 9e83b92

Please sign in to comment.