Fix auto links for arrays.

This commit is contained in:
Julien Fontanet
2015-05-14 14:58:27 +02:00
parent d7208a15d9
commit a0ba5c8a57
+3 -1
View File
@@ -118,7 +118,9 @@ const OPAQUE_REF_RE = /^OpaqueRef:/
function createAutoLinks (collection, object) {
forEach(object, function resolveObject (value, key, object) {
if (isArray(value)) {
if (value.length || !OPAQUE_REF_RE.test(value)) {
// Do not create an array of links unless it is known this is an
// array of refs.
if (value.length && !OPAQUE_REF_RE.test(value)) {
return
}