feat(aio): revise Docs page; docs version selector in sidenav
This commit is contained in:

committed by
Pete Bacon Darwin

parent
de25cfc0cb
commit
4be1966a21
@ -34,13 +34,15 @@ function walk(node, map, path) {
|
||||
let errors = [];
|
||||
for(const key in node) {
|
||||
const child = node[key];
|
||||
if (key === 'url') {
|
||||
const url = child.replace(/#.*$/, ''); // strip hash
|
||||
if (isRelative(url) && !map[url]) {
|
||||
errors.push({ path: path.join('.'), url });
|
||||
if (child !== null) { // null is allowed
|
||||
if (key === 'url') {
|
||||
const url = child.replace(/#.*$/, ''); // strip hash
|
||||
if (isRelative(url) && !map[url]) {
|
||||
errors.push({ path: path.join('.'), url });
|
||||
}
|
||||
} else if (typeof child !== 'string') {
|
||||
errors = errors.concat(walk(child, map, path.concat([key])));
|
||||
}
|
||||
} else if (typeof child !== 'string') {
|
||||
errors = errors.concat(walk(child, map, path.concat([key])));
|
||||
}
|
||||
}
|
||||
return errors;
|
||||
|
Reference in New Issue
Block a user