1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 08:11:27 +02:00

Add in BC layer for props, initProps, m.withAttr, and m.prop (#2310)

This commit is contained in:
Alexander Skvortsov
2020-09-24 22:30:55 -04:00
committed by GitHub
parent aea8a3ff1f
commit 54ff6e720c
2 changed files with 38 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import Stream from 'mithril/stream';
import extract from './extract';
import withAttr from './withAttr';
export default function patchMithril(global) {
const defaultMithril = global.m;
@@ -68,5 +69,11 @@ export default function patchMithril(global) {
modifiedMithril.route.Link = modifiedLink;
// BEGIN DEPRECATED MITHRIL 2 BC LAYER
modifiedMithril.prop = Stream;
modifiedMithril.withAttr = withAttr;
// END DEPRECATED MITHRIL 2 BC LAYER
global.m = modifiedMithril;
}