Skip to content

Commit

Permalink
fix: remove excess null check
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jan 3, 2021
1 parent 2689a9a commit 89a7756
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/dom-styles-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export default class DOMStylesReader {
*/
this.domStylesCache = new Map()


this.dummyNode = undefined

/**
* Set to true once tokenized
* @access private
Expand Down Expand Up @@ -61,9 +64,7 @@ export default class DOMStylesReader {
const scope = scopes[i]
const node = document.createElement('span')
node.className = scope.replace(dotRegexp, ' ')

if (parent != null) { parent.appendChild(node) }

parent.appendChild(node)
parent = node
}

Expand Down Expand Up @@ -92,7 +93,7 @@ export default class DOMStylesReader {
* @access private
*/
ensureDummyNodeExistence (targetNode) {
if (this.dummyNode == null) {
if (this.dummyNode === undefined) {
/**
* @access private
*/
Expand Down

0 comments on commit 89a7756

Please sign in to comment.