Skip to content

Commit

Permalink
warn when ranges not found
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Dec 8, 2016
1 parent 9352a1f commit 913604e
Show file tree
Hide file tree
Showing 11 changed files with 72,578 additions and 35,560 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifesto",
"version": "2.0.5",
"version": "2.0.6",
"homepage": "https://github.com/edsilv/manifesto",
"authors": [
"edsilv <[email protected]>"
Expand Down
8 changes: 7 additions & 1 deletion dist/client/manifesto.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,14 @@ var Manifesto;
};
Manifest.prototype._parseRanges = function (r, path, parentRange) {
var range;
var id;
if (_isString(r)) {
r = this._getRangeById(r);
id = r;
r = this._getRangeById(id);
}
if (!r) {
console.warn("Range:", id, "does not exist");
return;
}
range = new Manifesto.Range(r, this.options);
range.parentRange = parentRange;
Expand Down
10 changes: 8 additions & 2 deletions dist/client/manifesto.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto.js v2.0.5 https://github.com/viewdir/manifesto
// manifesto.js v2.0.6 https://github.com/viewdir/manifesto
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.manifesto = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
var Manifesto;
Expand Down Expand Up @@ -936,8 +936,14 @@ var Manifesto;
};
Manifest.prototype._parseRanges = function (r, path, parentRange) {
var range;
var id;
if (_isString(r)) {
r = this._getRangeById(r);
id = r;
r = this._getRangeById(id);
}
if (!r) {
console.warn("Range:", id, "does not exist");
return;
}
range = new Manifesto.Range(r, this.options);
range.parentRange = parentRange;
Expand Down
16 changes: 8 additions & 8 deletions dist/client/manifesto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/manifesto.bundle.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto.js v2.0.5 https://github.com/viewdir/manifesto
// manifesto.js v2.0.6 https://github.com/viewdir/manifesto
declare module exjs {
}
declare module exjs {
Expand Down
2 changes: 1 addition & 1 deletion dist/manifesto.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// manifesto.js v2.0.5 https://github.com/viewdir/manifesto
// manifesto.js v2.0.6 https://github.com/viewdir/manifesto
declare module Manifesto {
class StringValue {
value: string;
Expand Down
10 changes: 8 additions & 2 deletions dist/server/manifesto.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/server/manifesto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "manifesto.js",
"version": "2.0.5",
"version": "2.0.6",
"description": "IIIF Presentation API utility library for client and server",
"main": "dist/server/manifesto.js",
"scripts": {
Expand Down
9 changes: 8 additions & 1 deletion src/Manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,16 @@ module Manifesto {

private _parseRanges(r: any, path: string, parentRange?: IRange): void{
var range: IRange;
var id: string;

if (_isString(r)){
r = this._getRangeById(r);
id = r;
r = this._getRangeById(id);
}

if (!r) {
console.warn("Range:", id, "does not exist");
return;
}

range = new Range(r, this.options);
Expand Down
108,069 changes: 72,531 additions & 35,538 deletions test/fixtures/book-of-remembrance.json

Large diffs are not rendered by default.

0 comments on commit 913604e

Please sign in to comment.