@opra/common 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +7 -1
- package/cjs/http/opra-url-path.js +7 -1
- package/esm/http/opra-url-path.js +7 -1
- package/package.json +1 -1
package/browser.js
CHANGED
|
@@ -11412,8 +11412,14 @@ var OpraURLPath = class _OpraURLPath {
|
|
|
11412
11412
|
}
|
|
11413
11413
|
_resolve(items, join) {
|
|
11414
11414
|
let paths = (Array.isArray(items) ? items : [items]).map((item) => {
|
|
11415
|
-
if (typeof item === "object" && !(item instanceof _OpraURLPath || item instanceof OpraURLPathComponent))
|
|
11415
|
+
if (typeof item === "object" && !(item instanceof _OpraURLPath || item instanceof OpraURLPathComponent)) {
|
|
11416
11416
|
item = new OpraURLPathComponent(item);
|
|
11417
|
+
if (item.resource.includes("/")) {
|
|
11418
|
+
const subPath = new _OpraURLPath(item.resource);
|
|
11419
|
+
subPath[subPath.length - 1].key = item.key;
|
|
11420
|
+
return String(subPath);
|
|
11421
|
+
}
|
|
11422
|
+
}
|
|
11417
11423
|
item = String(item);
|
|
11418
11424
|
if (item.includes("?"))
|
|
11419
11425
|
item = splitString2(item, {
|
|
@@ -66,8 +66,14 @@ class OpraURLPath {
|
|
|
66
66
|
}
|
|
67
67
|
_resolve(items, join) {
|
|
68
68
|
let paths = (Array.isArray(items) ? items : [items]).map(item => {
|
|
69
|
-
if (typeof item === 'object' && !(item instanceof OpraURLPath || item instanceof OpraURLPathComponent))
|
|
69
|
+
if (typeof item === 'object' && !(item instanceof OpraURLPath || item instanceof OpraURLPathComponent)) {
|
|
70
70
|
item = new OpraURLPathComponent(item);
|
|
71
|
+
if (item.resource.includes('/')) {
|
|
72
|
+
const subPath = new OpraURLPath(item.resource);
|
|
73
|
+
subPath[subPath.length - 1].key = item.key;
|
|
74
|
+
return String(subPath);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
71
77
|
item = String(item);
|
|
72
78
|
// Remove url parts coming after path (query, hash parts)
|
|
73
79
|
if (item.includes('?'))
|
|
@@ -62,8 +62,14 @@ export class OpraURLPath {
|
|
|
62
62
|
}
|
|
63
63
|
_resolve(items, join) {
|
|
64
64
|
let paths = (Array.isArray(items) ? items : [items]).map(item => {
|
|
65
|
-
if (typeof item === 'object' && !(item instanceof OpraURLPath || item instanceof OpraURLPathComponent))
|
|
65
|
+
if (typeof item === 'object' && !(item instanceof OpraURLPath || item instanceof OpraURLPathComponent)) {
|
|
66
66
|
item = new OpraURLPathComponent(item);
|
|
67
|
+
if (item.resource.includes('/')) {
|
|
68
|
+
const subPath = new OpraURLPath(item.resource);
|
|
69
|
+
subPath[subPath.length - 1].key = item.key;
|
|
70
|
+
return String(subPath);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
67
73
|
item = String(item);
|
|
68
74
|
// Remove url parts coming after path (query, hash parts)
|
|
69
75
|
if (item.includes('?'))
|