Update gradient.class.js

Fixed some errore introduced with commit.
Update gradient.class.js
Merge pull request #1602 from asturur/Gradient-Fix-Part2

Update gradient.class.js