Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

Fixed SG not generating proper configs #358

Merged
merged 7 commits into from
Sep 14, 2017
Merged

Fixed SG not generating proper configs #358

merged 7 commits into from
Sep 14, 2017

Conversation

FOG-Yamato
Copy link
Contributor

Proposed Semver Increment Bump: [MAJOR/MINOR/PATCH]

PATCH

Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)

(If Applicable) What Issue does it fix?

Fixed SG not generating proper configs

@@ -6,12 +6,12 @@ exports.getTable = table => this.database.get(table) || this.database.set(table,

exports.getAll = (table) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed to

exports.getAll(table) => {
  return Array.from(this.getTable(table).values());
}

getTable will automatically create the table for you (as it should), which means there will never be a time when the table doesn't exist and therefore no reason to check for the collection beforehand or return an empty array/null

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exports.getAll(table) => Array.from(this.getTable(table).values());

actually this^

Copy link
Contributor

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update changelog.

@CyberiumShadow CyberiumShadow dismissed stale reviews from UnseenFaith and kyranet September 14, 2017 21:05

Changes Made manually

@CyberiumShadow CyberiumShadow merged commit f951fd3 into UnseenFaith:master Sep 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants