fix: convert to string first before using includes
This commit is contained in:
parent
c74a248e1d
commit
ca48eef612
1 changed files with 2 additions and 2 deletions
|
|
@ -20,8 +20,8 @@ Singleton {
|
|||
onFileChanged: reload()
|
||||
onAdapterUpdated: writeAdapter()
|
||||
onLoadFailed: function(error) {
|
||||
if (error.includes("No such file")) {
|
||||
themeData = {}
|
||||
if (error.toString().includes("No such file") || error === 2) {
|
||||
// File doesn't exist, create it with default values
|
||||
writeAdapter()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue