From ab85b498458e5e140082654fb7216ea38faa5d02 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 10 Aug 2020 19:03:45 -0400 Subject: [PATCH] fix patchMithril: add Fix for m.route.Link with vnode.children not showing anything. --- js/src/common/utils/patchMithril.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/src/common/utils/patchMithril.js b/js/src/common/utils/patchMithril.js index 3acc9e0db..29d7232f4 100644 --- a/js/src/common/utils/patchMithril.js +++ b/js/src/common/utils/patchMithril.js @@ -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; }