Skip to content

Commit

Permalink
use '==' instead of '===' where safe
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed May 1, 2019
1 parent 67bf4a3 commit 4dab17d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/component.js
Expand Up @@ -102,7 +102,7 @@ let q = [];
* Asynchronously schedule a callback
* @type {(cb) => void}
*/
options.debounceRendering = typeof Promise=='function' ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout;
const defer = typeof Promise=='function' ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout;

/*
* The value of `Component.debounce` must asynchronously invoke the passed in callback. It is
Expand All @@ -119,7 +119,7 @@ options.debounceRendering = typeof Promise=='function' ? Promise.prototype.then.
*/
export function enqueueRender(c) {
if (!c._dirty && (c._dirty = true) && q.push(c) === 1) {
options.debounceRendering(process);
(options.debounceRendering || defer)(process);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/create-element.js
Expand Up @@ -85,8 +85,8 @@ export /* istanbul ignore next */ function Fragment() { }
* @returns {import('./internal').VNode | null}
*/
export function coerceToVNode(possibleVNode) {
if (possibleVNode == null || typeof possibleVNode === 'boolean') return null;
if (typeof possibleVNode === 'string' || typeof possibleVNode === 'number') {
if (possibleVNode == null || typeof possibleVNode == 'boolean') return null;
if (typeof possibleVNode === 'string' || typeof possibleVNode == 'number') {
return createVNode(null, null, possibleVNode, null, null);
}

Expand Down

0 comments on commit 4dab17d

Please sign in to comment.