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)