mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1205833 - Don't log an error if we did not store any datareporting policy notify date yet. r=dexter
This commit is contained in:
parent
9d479244a0
commit
1b25f70430
@ -184,16 +184,17 @@ var TelemetryReportingPolicyImpl = {
|
||||
* @return {Object} A date object or null on errors.
|
||||
*/
|
||||
get dataSubmissionPolicyNotifiedDate() {
|
||||
if (!Preferences.has(PREF_ACCEPTED_POLICY_DATE)) {
|
||||
let prefString = Preferences.get(PREF_ACCEPTED_POLICY_DATE, "0");
|
||||
let valueInteger = parseInt(prefString, 10);
|
||||
|
||||
// Bail out if we didn't store any value yet.
|
||||
if (valueInteger == 0) {
|
||||
this._log.info("get dataSubmissionPolicyNotifiedDate - No date stored yet.");
|
||||
return null;
|
||||
}
|
||||
|
||||
let prefString = Preferences.get(PREF_ACCEPTED_POLICY_DATE, 0);
|
||||
let valueInteger = parseInt(prefString, 10);
|
||||
|
||||
// If nothing or an invalid value is saved in the prefs, bail out.
|
||||
if (Number.isNaN(valueInteger) || valueInteger == 0) {
|
||||
// If an invalid value is saved in the prefs, bail out too.
|
||||
if (Number.isNaN(valueInteger)) {
|
||||
this._log.error("get dataSubmissionPolicyNotifiedDate - Invalid date stored.");
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user