Update mapjs-compiled.js

Occasionally got an error where finalPosition was undefined after line 3863.  Added an if statement to catch it and cancel the change.  This is my first edit on GitHub so let me know if there are any problems with it. Thanks.