@internetarchive/bookreader 5.0.0-48-alpha0 → 5.0.0-48-alpha2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/bookreader",
3
- "version": "5.0.0-48-alpha0",
3
+ "version": "5.0.0-48-alpha2",
4
4
  "description": "The Internet Archive BookReader.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@ export default class DownloadsProvider {
11
11
  this.downloads = [];
12
12
  this.id = 'downloads';
13
13
  this.component = '';
14
- this.isBookProtected = bookreader?.options?.isProtected || false;
14
+ this.isBookProtected = bookreader?.options?.protected ?? false;
15
15
  }
16
16
 
17
17
  update(downloadTypes) {
@@ -33,7 +33,7 @@ export default class DownloadsProvider {
33
33
  const [ type = '', link = '' ] = incoming;
34
34
  if (!type) return found;
35
35
  let formattedType = type.toLowerCase();
36
- if ((formattedType === 'pdf' || formattedType === 'epub') && this.isbookProtected) {
36
+ if ((formattedType === 'pdf' || formattedType === 'epub') && this.isBookProtected) {
37
37
  formattedType = `adobe${formattedType}`;
38
38
  }
39
39
  found[formattedType] = link;