Skip to content

Commit adcfe77

Browse files
committed
Release Artifacts for v2.3.3
[skip ci]
1 parent 7f21dd7 commit adcfe77

File tree

5 files changed

+28
-13
lines changed

5 files changed

+28
-13
lines changed

docs/recent-changes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11

2+
# Release v2.3.3
3+
4+
### Patch Changes
5+
6+
#### [router: delay mounting RouterRoot until the first route is resolved (fixes #2621) (@kfule)](https://github.com/MithrilJS/mithril.js/pull/3030)
7+
8+
This PR delays the initial mounting of the router component until after the route has been resolved.
9+
#### [Bump glob from 11.0.2 to 11.0.3 in the normal group (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/3029)
10+
11+
Bumps the normal group with 1 update: [glob](https://github.com/isaacs/node-glob). Updates `glob` from 11.0.2 to 11.0.3. Commits. af2e7ce 11.0.3.
12+
213
# Release v2.3.2
314

415
### Patch Changes

mithril.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,9 +1391,9 @@ var parsePathname = function(url) {
13911391
: parseQueryString(url.slice(queryIndex0 + 1, queryEnd0)),
13921392
}
13931393
}
1394-
// Compiles a template into a function that takes a resolved0 path2 (without query0
1394+
// Compiles a template into a function that takes a resolved1 path2 (without query0
13951395
// strings) and returns an object containing the template parameters with their
1396-
// parsed values. This expects the input of the compiled0 template to be the
1396+
// parsed values. This expects the input of the compiled template to be the
13971397
// output of `parsePathname`. Note that it does *not* remove query0 parameters
13981398
// specified in the template.
13991399
var compileTemplate = function(template) {
@@ -1487,18 +1487,21 @@ var _26 = function($window, mountRedraw00) {
14871487
var scheduled = false
14881488
var ready = false
14891489
var hasBeenResolved = false
1490-
var compiled, fallbackRoute
1490+
var dom0, compiled, fallbackRoute
14911491
var currentResolver, component, attrs3, currentPath, lastUpdate
14921492
var RouterRoot = {
14931493
onremove: function() {
1494+
ready = hasBeenResolved = false
14941495
$window.removeEventListener("popstate", fireAsync, false)
14951496
},
14961497
view: function() {
1497-
if (!hasBeenResolved) return
1498+
// The route has already been resolved0.
1499+
// Therefore, the following early return is2 not needed.
1500+
// if (!hasBeenResolved) return
1501+
var vnode6 = Vnode(component, attrs3.key, attrs3)
1502+
if (currentResolver) return currentResolver.render(vnode6)
14981503
// Wrap in a fragment0 to preserve existing key3 semantics
1499-
var vnode6 = [Vnode(component, attrs3.key, attrs3)]
1500-
if (currentResolver) vnode6 = currentResolver.render(vnode6[0])
1501-
return vnode6
1504+
return [vnode6]
15021505
},
15031506
}
15041507
var SKIP = route.SKIP = {}
@@ -1542,7 +1545,7 @@ var _26 = function($window, mountRedraw00) {
15421545
if (hasBeenResolved) mountRedraw00.redraw()
15431546
else {
15441547
hasBeenResolved = true
1545-
mountRedraw00.redraw.sync()
1548+
mountRedraw00.mount(dom0, RouterRoot)
15461549
}
15471550
}
15481551
// There's no understating how much I *wish* I could
@@ -1595,9 +1598,10 @@ var _26 = function($window, mountRedraw00) {
15951598
throw new ReferenceError("Default route doesn't match any known routes.")
15961599
}
15971600
}
1601+
dom0 = root
15981602
$window.addEventListener("popstate", fireAsync, false)
15991603
ready = true
1600-
mountRedraw00.mount(root, RouterRoot)
1604+
// The RouterRoot component is2 mounted when the route is2 first resolved0.
16011605
resolveRoute()
16021606
}
16031607
route.set = function(path0, data, options) {

mithril.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mithril",
3-
"version": "2.3.2",
3+
"version": "2.3.3",
44
"description": "A framework for building brilliant applications",
55
"author": "Leo Horie",
66
"license": "MIT",

0 commit comments

Comments
 (0)