mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 00:25:03 +08:00
Allow more flexible coersion from int to bool to fix unread perspective
This commit is contained in:
parent
c84a6fd957
commit
72a4cbd3dd
1 changed files with 2 additions and 2 deletions
|
@ -13,10 +13,10 @@ export default class AttributeBoolean extends Attribute {
|
|||
return val;
|
||||
}
|
||||
fromJSON(val) {
|
||||
return ((val === 'true') || (val === 1) || (val === true)) || false;
|
||||
return ((val === 'true') || (val / 1 >= 1) || (val === true)) || false;
|
||||
}
|
||||
fromColumn(val) {
|
||||
return (val === 1) || false;
|
||||
return (val >= 1) || false;
|
||||
}
|
||||
columnSQL() {
|
||||
const defaultValue = this.defaultValue ? 1 : 0;
|
||||
|
|
Loading…
Reference in a new issue