Skip to content

Commit

Permalink
Merge a6147c6 into 787575f
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelvilche committed May 28, 2020
2 parents 787575f + a6147c6 commit e55b23f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/get-setting-api.js
Expand Up @@ -32,7 +32,7 @@ module.exports = class GetSettingApi extends API {
const settingsFormatted = {};

Object.entries(defaultSettings).forEach(([settingName, setting]) => {
settingsFormatted[settingName] = (clientSettings.values && typeof clientSettings.values[settingName] !== 'undefined')
settingsFormatted[settingName] = (clientSettings && clientSettings.values && typeof clientSettings.values[settingName] !== 'undefined')
? clientSettings.values[settingName]
: setting.default;
});
Expand Down
2 changes: 1 addition & 1 deletion tests/get-setting-api.js
Expand Up @@ -75,7 +75,7 @@ describe('Setting Api Get Tests', () => {
before: sandbox => {
mockRequire(defaultDefinitionPath, settingsDefinition);
sandbox.stub(ClientSettingsModel.prototype, 'getBy');
ClientSettingsModel.prototype.getBy.resolves({});
ClientSettingsModel.prototype.getBy.resolves(null);
},
request: { pathParameters: ['sample-entity'] },
session: true,
Expand Down

0 comments on commit e55b23f

Please sign in to comment.