Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29737555: Noissue - Check for null and blank string instead of undefined (Closed)

Created:
March 30, 2018, 1:54 p.m. by Manish Jethani
Modified:
April 5, 2018, 5:34 p.m.
Reviewers:
kzar
Base URL:
https://hg.adblockplus.org/adblockpluscore/
Visibility:
Public.

Description

Noissue - Check for null and blank string instead of undefined

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M lib/filterClasses.js View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
Manish Jethani
March 30, 2018, 1:54 p.m. (2018-03-30 13:54:40 UTC) #1
Manish Jethani
Patch Set 1 value is guaranteed never to be undefined here, so there's no point ...
March 30, 2018, 1:55 p.m. (2018-03-30 13:55:49 UTC) #2
kzar
April 5, 2018, 2:45 p.m. (2018-04-05 14:45:01 UTC) #3
On 2018/03/30 13:55:49, Manish Jethani wrote:
> Patch Set 1
> 
> value is guaranteed never to be undefined here, so there's no point in
checking
> for undefined. If we really want a check, we should check for null and the
blank
> string.

Yea, I nearly did `typeof value == "string"` when adding the $csp one but wanted
to be consistent with these other checks. But good point we should be checking
for null really anyway.

LGTM

Powered by Google App Engine
This is Rietveld