mirror of
https://github.com/flarum/core.git
synced 2025-08-12 03:14:33 +02:00
fix patchMithril: add Fix for m.route.Link with vnode.children not showing anything.
This commit is contained in:
committed by
Franz Liedke
parent
04e5d5884f
commit
ab85b49845
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user