session list: fix "remove from history" always removing the first item in the list (#264)
This commit is contained in:
parent
63ca242657
commit
e40d7f8e3b
2 changed files with 6 additions and 2 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
## next
|
||||
|
||||
- bug fixes
|
||||
- session list: fix "remove from history" always removing the first item in the list
|
||||
- custom module
|
||||
- expose `setInterval`
|
||||
- prevent errors when failing to run the module
|
||||
|
|
|
|||
|
|
@ -59,8 +59,10 @@ module.exports = {
|
|||
|
||||
sessionRemoveFromHistory: function(data) {
|
||||
var sessionlist = settings.read('recentSessions')
|
||||
sessionlist.splice(data,1)
|
||||
settings.write('recentSessions',sessionlist)
|
||||
if (sessionlist.indexOf(data) > -1) {
|
||||
sessionlist.splice(sessionlist.indexOf(data),1)
|
||||
settings.write('recentSessions',sessionlist)
|
||||
}
|
||||
},
|
||||
|
||||
sessionOpen: function(data,clientId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue