Skip to content

Commit

Permalink
bugfix #44
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoda committed Sep 20, 2016
1 parent eb64604 commit 32d7019
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions dist/spa-apis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* SPA v2.0.4
* SPA v2.0.5
* A webapp framework for routing control and view transitions
* Copyright 2016 zhaoda <http://zhaoda.net>
* Licensed under MIT
Expand Down Expand Up @@ -110,7 +110,7 @@
}

// 设置版本号,先留空,打包时会自动添加
$.spa.version = '2.0.4'
$.spa.version = '2.0.5'

/*
* 插入样式
Expand Down Expand Up @@ -1859,7 +1859,7 @@
pagescache[key] = $view
}

viewscache.unshift(type + ':' + key)
viewscache.unshift(type + ':' + encodeURIComponent(key))

// 再清理
if(viewcachecount !== 0 && viewscache.length > viewcachecount) {
Expand All @@ -1872,7 +1872,7 @@
$.each(cleanup, function(index, value) {
cleanupsplit = value.split(':', 2)
cleanuptype = cleanupsplit[0]
cleanupkey = cleanupsplit[1]
cleanupkey = decodeURIComponent(cleanupsplit[1])

cleanupcache = cleanuptype == 'page' ? pagescache : panelscache
$('img', cleanupcache[cleanupkey]).remove()
Expand Down Expand Up @@ -1903,7 +1903,7 @@
key = viewsdata[viewId].hash
}

name = type + ':' + key
name = type + ':' + encodeURIComponent(key)
index = viewscache.indexOf(name)

if(index !== -1) {
Expand Down
4 changes: 2 additions & 2 deletions dist/spa-apis.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/spa.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* SPA v2.0.4
* SPA v2.0.5
* A webapp framework for routing control and view transitions
* Copyright 2016 zhaoda <http://zhaoda.net>
* Licensed under MIT
Expand Down Expand Up @@ -110,7 +110,7 @@
}

// 设置版本号,先留空,打包时会自动添加
$.spa.version = '2.0.4'
$.spa.version = '2.0.5'

/*
* 插入样式
Expand Down Expand Up @@ -1859,7 +1859,7 @@
pagescache[key] = $view
}

viewscache.unshift(type + ':' + key)
viewscache.unshift(type + ':' + encodeURIComponent(key))

// 再清理
if(viewcachecount !== 0 && viewscache.length > viewcachecount) {
Expand All @@ -1872,7 +1872,7 @@
$.each(cleanup, function(index, value) {
cleanupsplit = value.split(':', 2)
cleanuptype = cleanupsplit[0]
cleanupkey = cleanupsplit[1]
cleanupkey = decodeURIComponent(cleanupsplit[1])

cleanupcache = cleanuptype == 'page' ? pagescache : panelscache
$('img', cleanupcache[cleanupkey]).remove()
Expand Down Expand Up @@ -1903,7 +1903,7 @@
key = viewsdata[viewId].hash
}

name = type + ':' + key
name = type + ':' + encodeURIComponent(key)
index = viewscache.indexOf(name)

if(index !== -1) {
Expand Down
4 changes: 2 additions & 2 deletions dist/spa.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spa.js",
"title": "SPA",
"version": "2.0.4",
"version": "2.0.5",
"description": "A webapp framework for routing control and view transitions",
"directories": {
"doc": "docs"
Expand Down
6 changes: 3 additions & 3 deletions src/spa.js
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@
pagescache[key] = $view
}

viewscache.unshift(type + ':' + key)
viewscache.unshift(type + ':' + encodeURIComponent(key))

// 再清理
if(viewcachecount !== 0 && viewscache.length > viewcachecount) {
Expand All @@ -1865,7 +1865,7 @@
$.each(cleanup, function(index, value) {
cleanupsplit = value.split(':', 2)
cleanuptype = cleanupsplit[0]
cleanupkey = cleanupsplit[1]
cleanupkey = decodeURIComponent(cleanupsplit[1])

cleanupcache = cleanuptype == 'page' ? pagescache : panelscache
$('img', cleanupcache[cleanupkey]).remove()
Expand Down Expand Up @@ -1896,7 +1896,7 @@
key = viewsdata[viewId].hash
}

name = type + ':' + key
name = type + ':' + encodeURIComponent(key)
index = viewscache.indexOf(name)

if(index !== -1) {
Expand Down

0 comments on commit 32d7019

Please sign in to comment.