fix: convert to string first before using includes

This commit is contained in:
JPratama7 2025-07-27 18:12:12 +07:00
parent c74a248e1d
commit ca48eef612
No known key found for this signature in database
GPG key ID: CD3EB7D0490C5F4B

View file

@ -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()
}
}