Skip to content

Commit

Permalink
fix: settings improperly displaying (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
elijaholmos authored Dec 7, 2022
1 parent 68c90d7 commit e1815b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "halo-discord-extension",
"version": "2.2.0",
"version": "2.2.1",
"description": "Receive Discord notifications for updates in Halo",
"author": "Elijah Olmos",
"license": "AGPL-3.0-only",
Expand Down
2 changes: 1 addition & 1 deletion src/popup/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// settings
default_settings = await getDefaultSettings();
//apply default settings to user_settings
user_settings = Object.values(default_settings).reduce(
user_settings = default_settings.reduce(
(acc, { id, value }) => (!!acc.hasOwnProperty(id) ? acc : { ...acc, [id]: value }),
await getUserSettings()
);
Expand Down
4 changes: 2 additions & 2 deletions src/util/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ export const getDefaultSettings = async function () {
try {
console.log('getDefaultSettings');
const settings = await get(ref(db, 'default_settings'));
return settings.exists() ? settings.val() : {};
return settings.exists() ? Object.values(settings.val()) : [];
} catch (e) {
console.error('getUserSettings error', e);
return {};
return [];
}
};

Expand Down

0 comments on commit e1815b7

Please sign in to comment.