mirror of
https://github.com/flarum/core.git
synced 2025-07-20 08:11:27 +02:00
Put m.stream in flarum/utils/stream (#2316)
This commit is contained in:
committed by
GitHub
parent
6860b24b70
commit
cc875f3e95
@@ -1,6 +1,6 @@
|
||||
import Stream from 'mithril/stream';
|
||||
import extract from './extract';
|
||||
import withAttr from './withAttr';
|
||||
import Stream from './Stream';
|
||||
|
||||
let deprecatedMPropWarned = false;
|
||||
let deprecatedMWithAttrWarned = false;
|
||||
@@ -68,15 +68,13 @@ export default function patchMithril(global) {
|
||||
|
||||
Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));
|
||||
|
||||
modifiedMithril.stream = Stream;
|
||||
|
||||
modifiedMithril.route.Link = modifiedLink;
|
||||
|
||||
// BEGIN DEPRECATED MITHRIL 2 BC LAYER
|
||||
modifiedMithril.prop = function (...args) {
|
||||
modifiedMithril.prop = modifiedMithril.stream = function (...args) {
|
||||
if (!deprecatedMPropWarned) {
|
||||
deprecatedMPropWarned = true;
|
||||
console.warn('m.prop() is deprecated, please use m.stream() instead.');
|
||||
console.warn('m.prop() is deprecated, please use the Stream util (flarum/utils/Streams) instead.');
|
||||
}
|
||||
return Stream.bind(this)(...args);
|
||||
};
|
||||
|
Reference in New Issue
Block a user