#9575 closed bug (invalid)
animate function does't cast regex.exec() parameter to string before calling
Reported by: | Ryan | Owned by: | Ryan |
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | effects | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Occasionally an integer is passed to exec that causes the page to crash in IE when using XRegExp (the integer causes XRegExp's call of str.slice to produce an "Object doesn't support this property or method" error).
At first I thought it might be an XRegExp issue but the javascript docs clearly state that a string is expected. Converting the exec argument to a string prior to the call solves the problem.
Line 8159 is the culprit:
parts = rfxnum.exec( val );
should be changed to
parts = rfxnum.exec( val == null ? null : String(val) );
(Environment: 1.6.1 on IE 8 with Windows 7 using XRexExp 1.5)
Change History (6)
comment:1 Changed 12 years ago by
Component: | unfiled → effects |
---|---|
Owner: | set to Rick Waldron |
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
Owner: | Rick Waldron deleted |
---|---|
Status: | assigned → open |
comment:4 Changed 12 years ago by
Owner: | set to Ryan |
---|---|
Status: | open → pending |
Can you get a test case / jsfiddle of this issue please?
comment:5 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
comment:6 Changed 11 years ago by
I get the same problem. Forcing string shoud resolve this issue: parts = rfxnum.exec( String(val) );
Is there a test case for this showing the error?