Skip to content

Commit

Permalink
Release Version 2.1.1 (public)
Browse files Browse the repository at this point in the history
Issues Addressed:
Bug:
- #298 Fix Saved Expression Feature
  • Loading branch information
brandon1024 authored Dec 26, 2019
2 parents 139fa22 + bfee603 commit 8128c5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion popup/js/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Find.register('Popup.History', function (self) {
* operation is complete.
* */
self.saveForHost = function(expression, callback) {
if (callback) {
if (!callback) {
callback = () => {};
}

Expand Down
8 changes: 6 additions & 2 deletions popup/js/saved-expressions-pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ Find.register('Popup.SavedExpressionsPane', function (self) {
break;
}
}

data.unshift(regex);
} else {
data = [];
}

data.unshift(regex);

//Add new entry as first child
let parentEl = document.getElementById('saved-expressions-entry-list');
for (let index = 0; index < parentEl.children.length; index++) {
Expand All @@ -103,6 +105,8 @@ Find.register('Popup.SavedExpressionsPane', function (self) {
nullEntry.parentNode.removeChild(nullEntry);
}

console.log(data);

Find.Popup.Storage.saveExpressions(data);
});
};
Expand Down

0 comments on commit 8128c5a

Please sign in to comment.