Fix assertion error documentation URL

Prefix version number with 'v' to obtain correct URL.

This fixes #8556.
This commit is contained in:
Roman Zoller
2018-09-21 16:03:39 +02:00
parent a31453b55f
commit 5c5fc3f892

View File

@@ -14,7 +14,7 @@ class AssertionError extends Error {
* @param {number} code Error code.
*/
constructor(code) {
const path = VERSION.split('-')[0];
const path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];
const message = 'Assertion failed. See https://openlayers.org/en/' + path +
'/doc/errors/#' + code + ' for details.';