Fix error with fit="true" and markers is undefined

When fit is set and markers is not, this line raises "TypeError: Cannot read property 'length' of undefined"