Closed crnkv closed 2 months ago
This code only run while the user update their add-on?
Only runs when me.data.version is different from me.VERSION (currently '9') (version of the database architecture) (i.e. when user's local installation is updated to a newer version with a newer database design), it seems
Now that version 4.9.1 has gone public, I, again, use firefox devtool to inspect into TextareaCache 4.9.1's database design:
On ta_database.init()
, we have me = ta_database
loaded from storage, then we have:
me.VERSION
which is '9'me._resetData
which has three keys: version, setting and exceptionsme.data
where:
me.data.version
matches me.VERSION
and me._resetData.version
me data.setting
is based on me._resetData.setting
me.data.exceptions
is based on me._resetData.exceptions
me.data.setting.version
is undefined
(this is by design, check out ta_database.reset() ), thus the line refering me.data.setting.version
in updateDatabaseVersion() is definitely a bug, so are the otherssquash and merge as 34dfe871cca9585ab89811231eefa82cf1fcb6a3
Several things fixed: