diff --git a/js/src/forum/components/Search.tsx b/js/src/forum/components/Search.tsx index 054c0b307..471e39322 100644 --- a/js/src/forum/components/Search.tsx +++ b/js/src/forum/components/Search.tsx @@ -76,7 +76,9 @@ export default class Search extends Compone return this.searchState; } protected set state(state: SearchState) { - fireDeprecationWarning('`state` property of the Search component is deprecated', '3212'); + // Workaround to prevent triggering deprecation warnings due to Mithril + // setting state to undefined when creating components + state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212'); this.searchState = state; }