gajus/swing

Cannot convert a Symbol value to a number

powerbuoy opened this issue · 6 comments

When I try to programmatically throw out a card using card.throwOut(Swing.Direction.LEFT, 0) I get an error saying Uncaught TypeError: Cannot convert a Symbol value to a number on line 46 of Card.js: var isHorizontal = Math.abs(fromX) > Math.abs(fromY);.

gajus commented

Should be an easy fix.

Awesome :) Is there a workaround in the meantime?

gajus commented

No, but you can contribute a fix.

gajus commented

Just in case, I don't have capacity to work on this.

Oh OK, tbh I have no idea how to fix it?

FWIW a workaround seems to be to simply pass in -1 for left and 1 for right.