Skip to content

Commit 03ea04e

Browse files
committed
Add a check for was_sustainer property to be an int.
1 parent cbb3010 commit 03ea04e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Simplenote/src/main/java/com/automattic/simplenote/models/Preferences.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ public boolean getWasSustainer() {
122122
return false;
123123
}
124124

125-
return (Boolean)getProperty(WAS_SUSTAINER_KEY);
125+
if (wasSustainer instanceof Boolean) {
126+
return (Boolean) wasSustainer;
127+
} else {
128+
return wasSustainer instanceof Integer && ((Integer) wasSustainer) > 0;
129+
}
126130
}
127131

128132
public static class Schema extends BucketSchema<Preferences> {

0 commit comments

Comments
 (0)