Closed littledan closed 8 years ago
In Chrome 53, certain Chrome-specific internationalization (Intl) APIs were removed. That change resulted in this application crashing on startup. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=617122 .
Intl
The affected code is at https://github.com/kaydensigh/chromecalclock/blob/a4ee118e6c110771b88b442466033c38b9fec015/app/background.js#L7 . Here, Intl.DateTimeFormat.prototype.resolved.pattern is used to find whether the clock is in 24-hour mode or not. Instead, you can use Intl.DateTimeFormat.prototype.resolvedOptions().hour12 for the same purpose: true indicates 12-hour and false indicates 24-hour.
Intl.DateTimeFormat.prototype.resolved.pattern
Intl.DateTimeFormat.prototype.resolvedOptions().hour12
true
false
Thanks for the detailed report! I've applied your suggested fix here: https://github.com/kaydensigh/chromecalclock/commit/5276fdf751cb7dec47669fe3ddc2c58ddbf70a36
Thanks, and sorry for the churn!
In Chrome 53, certain Chrome-specific internationalization (
Intl
) APIs were removed. That change resulted in this application crashing on startup. Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=617122 .The affected code is at https://github.com/kaydensigh/chromecalclock/blob/a4ee118e6c110771b88b442466033c38b9fec015/app/background.js#L7 . Here,
Intl.DateTimeFormat.prototype.resolved.pattern
is used to find whether the clock is in 24-hour mode or not. Instead, you can useIntl.DateTimeFormat.prototype.resolvedOptions().hour12
for the same purpose:true
indicates 12-hour andfalse
indicates 24-hour.