From 68b27cd75e625982d4fe793d09ca7d61a1ae0e0e Mon Sep 17 00:00:00 2001 From: Pavel Rumkin Date: Wed, 24 Apr 2019 19:25:22 +0300 Subject: [PATCH] [src,util] 1.2.0 ~> 1.2.1 Fix initial pathname normaliztion --- package.json | 2 +- src/pill.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6a529aa..078c55c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "pill", "description": "Pill dynamic content loading for static sites.", - "version": "1.2.0", + "version": "1.2.1", "main": "dist/node/pill.js", "devDependencies": { "babel-minify": "^0.5.0", diff --git a/src/pill.js b/src/pill.js index 6e87c35..63f695a 100644 --- a/src/pill.js +++ b/src/pill.js @@ -89,7 +89,7 @@ export default function pill(selector, options) { var url = new URL(document.location) var page = createPage(document.title, element.innerHTML, 200) var pages = {} - pages[url.pathname] = page + pages[normalizePathname(url.pathname)] = page function render (url, page, push) { updateState(null, url, page.title, push) setContent(element, page)