Skip to content

Chaining produces error "e.replace is not a function." #921

Description

@crackwilding

Your system information

  • VelocityJS version: 2.06
  • Browser: Chrome
  • Operating System: OSX

I have code in a class that looks like this:

    this.image.velocity('property', { 
      left: (mousepos[0] - 6) + 'px',
      top: (mousepos[1] - 24) + 'px',
      opacity: 1
    }).velocity(
      { 
        left: (mousepos[0] - 6 + dest[0]) + 'px',
        top: (mousepos[1] - 24 - dest[1]) + 'px',
        opacity: 0
      },
      { duration: 3000 }
    );

When I run it it tells me "Uncaught TypeError: e.replace is not a function." This is in velocity.min.js, line 6, and the stack shows calling function as the second velocity call above. mousepos is a two-element array of screen x and y, as is dest. If I take out the opacity value in the second call, it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions