You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine, except sometimes type is undefined:
'undefined' is not an object (evaluating 'input.$attr("type")['$==']')
What is a good way to protect the if statement from undefined values? I guess the JS way is typeof( input.attr( 'type' )) == 'undefined', but not sure how to generate this from Ruby.
I tried defined() and .nil? but they don't seem to do this check. Perhaps there is one way (or there should be) one way of doing this?
The text was updated successfully, but these errors were encountered:
The following code is raising an error:
This works fine, except sometimes type is undefined:
What is a good way to protect the if statement from undefined values? I guess the JS way is
typeof( input.attr( 'type' )) == 'undefined'
, but not sure how to generate this from Ruby.I tried
defined()
and.nil?
but they don't seem to do this check. Perhaps there is one way (or there should be) one way of doing this?The text was updated successfully, but these errors were encountered: