1
0
mirror of https://github.com/flarum/core.git synced 2025-08-12 11:24:30 +02:00

fix patchMithril: add Fix for m.route.Link with vnode.children not showing anything.

This commit is contained in:
Alexander Skvortsov
2020-08-10 19:03:45 -04:00
committed by Franz Liedke
parent 04e5d5884f
commit ab85b49845

View File

@@ -41,6 +41,12 @@ export default function patchMithril(global) {
node.attrs.href = node.attrs.route;
node.tag = modifiedLink;
// For some reason, m.route.Link does not like vnode.text, so if present, we
// need to convert it to text vnodes and store it in children.
if (node.text) {
node.children = { tag: '#', children: node.text };
}
delete node.attrs.route;
}