DEV: Do not include silenced Discourse deprecations in counter (#21336)

Silenced Ember deprecations were already being excluded from the test output. This applies the same logic to Discourse deprecations.
This commit is contained in:
David Taylor 2023-05-02 14:55:41 +01:00 committed by GitHub
parent b3e063bc63
commit 19540dfa0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -34,8 +34,12 @@ export default class DeprecationCounter {
let { id } = options; let { id } = options;
id ||= "discourse.(unknown)"; id ||= "discourse.(unknown)";
const matchingConfig = this.#configById.get(id);
if (matchingConfig !== "silence") {
this.incrementDeprecation(id); this.incrementDeprecation(id);
} }
}
incrementDeprecation(id) { incrementDeprecation(id) {
const existingCount = this.counts.get(id) || 0; const existingCount = this.counts.get(id) || 0;