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()
|
onFileChanged: reload()
|
||||||
onAdapterUpdated: writeAdapter()
|
onAdapterUpdated: writeAdapter()
|
||||||
onLoadFailed: function(error) {
|
onLoadFailed: function(error) {
|
||||||
if (error.includes("No such file")) {
|
if (error.toString().includes("No such file") || error === 2) {
|
||||||
themeData = {}
|
// File doesn't exist, create it with default values
|
||||||
writeAdapter()
|
writeAdapter()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue