Skip to content

Commit

Permalink
handle case where element doesn't have a type attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Nov 18, 2015
1 parent 1bd7fff commit 9e39b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/atoms/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bot.action.clear = function(element) {
element.value = '';
bot.events.fire(element, bot.events.EventType.CHANGE);
} else if (bot.dom.isElement(element, goog.dom.TagName.INPUT) &&
element.getAttribute('type').toLowerCase() == "number") {
(element.getAttribute('type') && element.getAttribute('type').toLowerCase() == "number")) {
// number input fields that have invalid inputs
// report their value as empty string with no way to tell if there is a
// current value or not
Expand Down

0 comments on commit 9e39b56

Please sign in to comment.