Replace console.error with logger.error

Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
Dariusz Niemczyk
2021-10-15 16:56:22 +02:00
committed by Dariusz Niemczyk
parent 515a8d2097
commit db01bfc0fd
9 changed files with 36 additions and 18 deletions

View File

@@ -16,6 +16,8 @@ limitations under the License.
import WebPlatform from "./WebPlatform";
import { logger } from "matrix-js-sdk/src/logger";
export default class PWAPlatform extends WebPlatform {
setNotificationCount(count: number) {
if (!navigator.setAppBadge) return super.setNotificationCount(count);
@@ -23,7 +25,7 @@ export default class PWAPlatform extends WebPlatform {
this.notificationCount = count;
navigator.setAppBadge(count).catch(e => {
console.error("Failed to update PWA app badge", e);
logger.error("Failed to update PWA app badge", e);
});
}
}