mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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 { BasePlugin } from "@uppy/core";
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import { warn } from "@ember/debug";
|
import { warn } from "@ember/debug";
|
||||||
|
import { isTesting } from "discourse-common/config/environment";
|
||||||
|
|
||||||
export class UppyPluginBase extends BasePlugin {
|
export class UppyPluginBase extends BasePlugin {
|
||||||
constructor(uppy, opts) {
|
constructor(uppy, opts) {
|
||||||
@ -9,7 +10,9 @@ export class UppyPluginBase extends BasePlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_consoleWarn(msg) {
|
_consoleWarn(msg) {
|
||||||
warn(`[${this.id}] ${msg}`, { id: `discourse.${this.id}` });
|
if (!isTesting()) {
|
||||||
|
warn(`[${this.id}] ${msg}`, { id: `discourse.${this.id}` });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_consoleDebug(msg) {
|
_consoleDebug(msg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user