Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
committed by
Dariusz Niemczyk
parent
9c594a8a96
commit
5e73a212f4
@@ -17,6 +17,8 @@ limitations under the License.
|
||||
import { IDestroyable } from "./IDestroyable";
|
||||
import { arrayFastClone } from "./arrays";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
export type WhenFn<T> = (w: Whenable<T>) => void;
|
||||
|
||||
/**
|
||||
@@ -73,7 +75,7 @@ export abstract class Whenable<T> implements IDestroyable {
|
||||
try {
|
||||
listener.fn(this);
|
||||
} catch (e) {
|
||||
console.error(`Error calling whenable listener for ${condition}:`, e);
|
||||
logger.error(`Error calling whenable listener for ${condition}:`, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user