Skip to content

Commit

Permalink
Clean up _defaultStepBase in <input>
Browse files Browse the repository at this point in the history
Restore to the original HTML definition of nonexistent for anything
other than type=week.
  • Loading branch information
TimothyGu committed Jan 14, 2020
1 parent 92e9adb commit 4a374e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/jsdom/living/nodes/HTMLInputElement-impl.js
Expand Up @@ -848,7 +848,10 @@ class HTMLInputElementImpl extends HTMLElementImpl {
return value;
}
}
return this._defaultStepBase;
if (this._defaultStepBase !== null) {
return this._defaultStepBase;
}
return 0;
}

// https://html.spec.whatwg.org/multipage/input.html#concept-input-step-default-base
Expand All @@ -857,7 +860,7 @@ class HTMLInputElementImpl extends HTMLElementImpl {
// The start of week 1970-W01
return -259200000;
}
return 0;
return null;
}

// https://html.spec.whatwg.org/multipage/input.html#common-input-element-attributes
Expand Down

0 comments on commit 4a374e5

Please sign in to comment.