Moves the doMorph check test outside the function
Moves the doMorph check test outside the function

It fixes a weird bug on some devices (iOS)

gideonmay/osgjs,jtorresfabra/osgjs,cedricpinson/osgjs,cedricpinson/osgjs,jtorresfabra/osgjs,jtorresfabra/osgjs,hishamabdelrahman/osgjs,cedricpinson/osgjs,hishamabdelrahman/osgjs,gideonmay/osgjs,hishamabdelrahman/osgjs,gideonmay/osgjs