Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

fix(AWSSM): treat value as object iff the es specifies .property #74

Merged
merged 2 commits into from
Jun 3, 2019

Conversation

silasbw
Copy link
Contributor

@silasbw silasbw commented Jun 1, 2019

See #73 for
discussion.

parsedValue = JSON.parse(value)
} catch (err) {
this._logger.warn(`Failed to JSON.parse '${value}':`, err)
return undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to return undefined, just return this._logger.warn...) instead ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we do that then this code takes a dependency on the return value of whatever logger we're using.

I'd rather have an additional line of code than an additional dependency on the return values of whatever logger we're using.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, can we just return then? undefined should be implicit.

Copy link
Contributor

@JacopoDaeli JacopoDaeli left a comment

Choose a reason for hiding this comment

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

A'd with a nit

@silasbw silasbw merged commit 1d5a9dd into master Jun 3, 2019
@silasbw silasbw deleted the fix0 branch June 3, 2019 16:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants