digirati-annotation-bridge
Advanced tools
Comparing version 0.8.12 to 0.8.13
@@ -54,5 +54,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
if (Object.prototype.toString.call(body) !== '[object Array]') { | ||
return null; | ||
if (Object.prototype.toString.call(body) !== '[object Array]' || body.length === 0) { | ||
return new AnnotationBody(); | ||
} | ||
var textualBody = body.filter(function (item) { | ||
@@ -66,3 +67,3 @@ return (item.type ? item.type : '').toLowerCase() === 'textualbody' || (item.type ? item.type : '').toLowerCase() === 'text'; | ||
var source = specificResource ? specificResource[0]['source'] : null; | ||
var source = specificResource && specificResource[0] ? specificResource[0]['source'] : null; | ||
var type = source ? tagClassForUri(source) : null; | ||
@@ -69,0 +70,0 @@ |
@@ -59,5 +59,6 @@ 'use strict'; | ||
if (Object.prototype.toString.call(body) !== '[object Array]') { | ||
return null; | ||
if (Object.prototype.toString.call(body) !== '[object Array]' || body.length === 0) { | ||
return new AnnotationBody(); | ||
} | ||
var textualBody = body.filter(function (item) { | ||
@@ -71,3 +72,3 @@ return (item.type ? item.type : '').toLowerCase() === 'textualbody' || (item.type ? item.type : '').toLowerCase() === 'text'; | ||
var source = specificResource ? specificResource[0]['source'] : null; | ||
var source = specificResource && specificResource[0] ? specificResource[0]['source'] : null; | ||
var type = source ? tagClassForUri(source) : null; | ||
@@ -74,0 +75,0 @@ |
{ | ||
"name": "digirati-annotation-bridge", | ||
"version": "0.8.12", | ||
"version": "0.8.13", | ||
"description": "Describe annotation-bridge here", | ||
@@ -22,3 +22,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"digirati-annotation-redux": "^0.8.12", | ||
"digirati-annotation-redux": "^0.8.13", | ||
"lodash.flatten": "^4.4.0" | ||
@@ -25,0 +25,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68143