mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-08-15 16:32:34 +02:00
[bug] fix edit state not setting to false when last link is removed
This commit is contained in:
11
js/link.js
11
js/link.js
@ -101,11 +101,22 @@ var link = (function() {
|
||||
|
||||
var remove = function(bookmarkData) {
|
||||
bookmarks.remove(bookmarkData.timeStamp);
|
||||
_checkCount();
|
||||
data.save();
|
||||
clear();
|
||||
render();
|
||||
};
|
||||
|
||||
var _checkCount = function() {
|
||||
if (bookmarks.get().length <= 0) {
|
||||
helper.setObject({
|
||||
object: state.get(),
|
||||
path: "bookmarks.edit",
|
||||
newValue: false
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
var _makeLinkForm = function() {
|
||||
var form = helper.makeNode({
|
||||
tag: "form",
|
||||
|
Reference in New Issue
Block a user