Assume latest if no ol.VERSION

This commit is contained in:
Tim Schaub
2017-04-13 05:54:51 -06:00
parent dff5cc63e7
commit 525fba6405
2 changed files with 7 additions and 3 deletions

View File

@@ -13,11 +13,12 @@ goog.require('ol');
*/
ol.AssertionError = function(code) {
var path = ol.VERSION ? ol.VERSION.split('-')[0] : 'latest';
/**
* @type {string}
*/
this.message = 'Assertion failed. See ' +
(ol.VERSION ? 'https://openlayers.org/en/' + ol.VERSION.split('-')[0] : '') +
this.message = 'Assertion failed. See https://openlayers.org/en/' + path +
'/doc/errors/#' + code + ' for details.';
/**