mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
fix build env
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user