From 2f649b75be6b7021883a1a8a9cba004e8b8af148 Mon Sep 17 00:00:00 2001 From: Yoshiki Shibukawa Date: Wed, 15 Apr 2015 00:50:29 +0900 Subject: [PATCH 1/2] Update mithril.route.md --- docs/mithril.route.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mithril.route.md b/docs/mithril.route.md index ceeb81a2..47eb6dd1 100644 --- a/docs/mithril.route.md +++ b/docs/mithril.route.md @@ -160,7 +160,7 @@ m.route(document.body, "/", { m.route("/dashboard"); // logs "unloading home" ``` -This mechanism is useful to clear timers and unsubscribe event handlers. If you have a hierarchy of components, you can recursively call `unload` on all the components in the tree or use a [pubsub](http://microjs.com/#pubsub) library to unload specific components on demand. +This mechanism is useful to clear timers and unsubscribe event handlers. If you have a hierarchy of components, you can recursively call `onunload` on all the components in the tree or use a [pubsub](http://microjs.com/#pubsub) library to unload specific components on demand. --- From ce20520f3a4aa60ffa9260692da950c797f93cea Mon Sep 17 00:00:00 2001 From: valtron Date: Tue, 14 Apr 2015 11:46:40 -0600 Subject: [PATCH 2/2] Canonicalize `options.method` in m.request --- mithril.js | 1 + 1 file changed, 1 insertion(+) diff --git a/mithril.js b/mithril.js index fe994854..c158c34f 100644 --- a/mithril.js +++ b/mithril.js @@ -1027,6 +1027,7 @@ var m = (function app(window, undefined) { var extract = xhrOptions.extract || function(xhr) { return xhr.responseText.length === 0 && deserialize === JSON.parse ? null : xhr.responseText }; + xhrOptions.method = (xhrOptions.method || 'GET').toUpperCase(); xhrOptions.url = parameterizeUrl(xhrOptions.url, xhrOptions.data); xhrOptions = bindData(xhrOptions, xhrOptions.data, serialize); xhrOptions.onload = xhrOptions.onerror = function(e) {