diff --git a/js/src/common/utils/patchMithril.js b/js/src/common/utils/patchMithril.js index 8360e2b95..a1b114167 100644 --- a/js/src/common/utils/patchMithril.js +++ b/js/src/common/utils/patchMithril.js @@ -1,12 +1,9 @@ -import Link from '../components/Link'; import withAttr from './withAttr'; import Stream from './Stream'; let deprecatedMPropWarned = false; let deprecatedMWithAttrWarned = false; -let deprecatedRouteWarned = false; - export default function patchMithril(global) { const defaultMithril = global.m; @@ -20,31 +17,13 @@ export default function patchMithril(global) { modifiedMithril.bidi(node, node.attrs.bidi); } - // DEPRECATED, REMOVE BETA 15 - - // Allows us to use a "route" attr on links, which will automatically convert the link to one which - // supports linking to other pages in the SPA without refreshing the document. - if (node.attrs.route) { - if (!deprecatedRouteWarned) { - deprecatedRouteWarned = true; - console.warn('The route attr patch for links is deprecated, please use the Link component (flarum/components/Link) instead.'); - } - - node.attrs.href = node.attrs.route; - node.tag = Link; - - delete node.attrs.route; - } - - // END DEPRECATED - return node; }; Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key])); // BEGIN DEPRECATED MITHRIL 2 BC LAYER - modifiedMithril.prop = modifiedMithril.stream = function (...args) { + modifiedMithril.prop = function (...args) { if (!deprecatedMPropWarned) { deprecatedMPropWarned = true; console.warn('m.prop() is deprecated, please use the Stream util (flarum/utils/Streams) instead.');