mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879537 - Be more strict when setting Date properties of contacts. r=gwagner
--HG-- extra : rebase_source : 61741dc83d4b1e4ca0a9bd7bae070fcb1aed63d1
This commit is contained in:
parent
3cf6d76d10
commit
e440660878
@ -417,7 +417,9 @@ Contact.prototype = {
|
||||
},
|
||||
|
||||
set bday(aBday) {
|
||||
if (aBday !== undefined && aBday !== null) {
|
||||
if (aBday instanceof Date) {
|
||||
this._bday = aBday;
|
||||
} else if (typeof aBday === "string" || typeof aBday === "number") {
|
||||
this._bday = new Date(aBday);
|
||||
}
|
||||
},
|
||||
@ -427,7 +429,9 @@ Contact.prototype = {
|
||||
},
|
||||
|
||||
set anniversary(aAnniversary) {
|
||||
if (aAnniversary !== undefined && aAnniversary !== null) {
|
||||
if (aAnniversary instanceof Date) {
|
||||
this._anniversary = aAnniversary;
|
||||
} else if (typeof aAnniversary === "string" || typeof aAnniversary === "number") {
|
||||
this._anniversary = new Date(aAnniversary);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user