Bug Tracker

Modify

Ticket #9575 (closed bug: invalid)

Opened 2 years ago

Last modified 20 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 2 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from undecided to high
  • Status changed from new to assigned
  • Component changed from unfiled to effects

comment:2 Changed 2 years ago by timmywil

Is there a test case for this showing the error?

comment:3 Changed 2 years ago by rwaldron

  • Owner rwaldron deleted
  • Status changed from assigned to open

comment:4 Changed 2 years ago by gnarf

  • Owner set to Ryan
  • Status changed from open to pending

Can you get a test case / jsfiddle of this issue please?

comment:5 Changed 2 years ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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 20 months ago by anonymous

I get the same problem. Forcing string shoud resolve this issue: parts = rfxnum.exec( String(val) );

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.