mirror of
https://github.com/flarum/framework.git
synced 2025-02-24 09:18:57 +08:00
fix: don't fire deprecation warnings for Mithril-originating action (#3236)
* fix: don't fire deprecation warnings for Mithril-originating actions * Add comment
This commit is contained in:
parent
847441c23a
commit
fb650a8696
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user