Skip to content

Commit

Permalink
fix: regression where filter:settings.set no longer received sorted…
Browse files Browse the repository at this point in the history
…-lists
  • Loading branch information
julianlam committed Jan 31, 2021
1 parent 5bc1f5b commit a8be6fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/meta/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Settings.getOne = async function (hash, field) {
Settings.set = async function (hash, values, quiet) {
quiet = quiet || false;

({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));

const sortedListData = {};
for (const key in values) {
if (values.hasOwnProperty(key)) {
Expand All @@ -55,8 +57,6 @@ Settings.set = async function (hash, values, quiet) {
}
const sortedLists = Object.keys(sortedListData);

({ plugin: hash, settings: values, quiet } = await plugins.hooks.fire('filter:settings.set', { plugin: hash, settings: values, quiet }));

if (sortedLists.length) {
await db.delete('settings:' + hash + ':sorted-lists');
await db.setAdd('settings:' + hash + ':sorted-lists', sortedLists);
Expand Down

0 comments on commit a8be6fb

Please sign in to comment.