This repository was archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 150
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #158 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 97 102 +5
=====================================
+ Hits 97 102 +5
Continue to review full report at Codecov.
|
index.js
Outdated
configurable: false, | ||
writable: false, | ||
enumerable: true, | ||
value: options.enable === false ? options.enable : true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace that with typeof options.enable === 'boolean'
?
Isn't what's there and what you're suggesting the same outcome?
…On Sun, Feb 25, 2018 at 10:32 PM, Vadim Demedes ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In index.js
<#158 (comment)>
:
> @@ -38,6 +39,12 @@ class Analytics {
this.flushAt = Math.max(options.flushAt, 1) || 20
this.flushInterval = options.flushInterval || 10000
this.flushed = false
+ Object.defineProperty(this, 'enable', {
+ configurable: false,
+ writable: false,
+ enumerable: true,
+ value: options.enable === false ? options.enable : true
Could you replace that with typeof options.enable === 'boolean'?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#158 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC__QKDqa_2DE7HEUL_lK1I06JzKKi1Kks5tYlAOgaJpZM4SSDgS>
.
|
Yes, the outcome is the same, but that code reads differently and is quicker to understand its purpose. |
Okay updated |
vadimdemedes
approved these changes
Feb 28, 2018
@wlingke Thanks! |
Released in |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #116, follow up from #118