mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 10:43:57 +08:00
DEV: Don't print uppy warnings in test env (#17121)
This commit is contained in:
parent
e0ff367b49
commit
f27f95b2e9
|
@ -1,6 +1,7 @@
|
|||
import { BasePlugin } from "@uppy/core";
|
||||
import { Promise } from "rsvp";
|
||||
import { warn } from "@ember/debug";
|
||||
import { isTesting } from "discourse-common/config/environment";
|
||||
|
||||
export class UppyPluginBase extends BasePlugin {
|
||||
constructor(uppy, opts) {
|
||||
|
@ -9,7 +10,9 @@ export class UppyPluginBase extends BasePlugin {
|
|||
}
|
||||
|
||||
_consoleWarn(msg) {
|
||||
warn(`[${this.id}] ${msg}`, { id: `discourse.${this.id}` });
|
||||
if (!isTesting()) {
|
||||
warn(`[${this.id}] ${msg}`, { id: `discourse.${this.id}` });
|
||||
}
|
||||
}
|
||||
|
||||
_consoleDebug(msg) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user