1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

fix build env

This commit is contained in:
Rokt33r
2015-10-19 11:46:58 +09:00
parent 55db0bebbb
commit 7459e937b5
15 changed files with 126 additions and 29 deletions

View File

@@ -81,8 +81,12 @@ function articles (state, action) {
let articles = JSON.parse(localStorage.getItem(teamKey))
let targetIndex = findIndex(articles, _article => article.key === _article.key)
console.log('before')
console.log(articles)
if (targetIndex < 0) articles.unshift(article)
else articles.splice(targetIndex, 1, article)
console.log('after')
console.log(articles)
localStorage.setItem(teamKey, JSON.stringify(articles))
state[teamKey] = articles