1
0
mirror of https://github.com/flarum/core.git synced 2025-06-26 04:34:45 +02:00

fix: don't fire deprecation warnings for Mithril-originating action ()

* fix: don't fire deprecation warnings for Mithril-originating actions

* Add comment
This commit is contained in:
David Wheatley
2021-12-28 20:51:13 +01:00
committed by GitHub
parent 4b25b90b48
commit 94f9e7f9de

@ -76,7 +76,9 @@ export default class Search<T extends SearchAttrs = SearchAttrs> extends Compone
return this.searchState; return this.searchState;
} }
protected set state(state: 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; this.searchState = state;
} }