Safer relative paths

This commit is contained in:
Tim Schaub
2016-12-18 14:57:55 -07:00
parent d20e9ca8df
commit 04639842f2
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "ol",
"version": "3.21.0-beta.1",
"version": "3.21.0-beta.2",
"description": "OpenLayers",
"main": "index.js",
"license": "BSD-2-Clause",

View File

@@ -28,7 +28,7 @@ function resolve(fromName, toName) {
}
var commonDepth = 1;
var fromLength = fromParts.length;
while (commonDepth < fromLength - 1) {
while (commonDepth < fromLength - 2) {
if (fromParts[commonDepth] === toParts[commonDepth]) {
++commonDepth;
} else {