Skip to content
This repository has been archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
Fix fetchPhotoList (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
roto5296 authored and 3846masa committed Nov 25, 2016
1 parent f0d09c4 commit bc5604d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ class GPhotos {
});

const photoList = results[0].map((al) => {
const type = (!al[9]) ? 'photo' : 'video';
const type = (!al[12]) ? 'photo' : 'video';
return new Photo({
id: al[0],
createdAt: al[2],
uploadedAt: al[5],
type: type,
length: (type === 'video') ? al[9]['76647426'][0] : null,
width: (type === 'photo') ? al[1][1] : al[9]['76647426'][2],
height: (type === 'photo') ? al[1][2] : al[9]['76647426'][3],
length: (type === 'video') ? al[12]['76647426'][0] : null,
width: (type === 'photo') ? al[1][1] : al[12]['76647426'][2],
height: (type === 'photo') ? al[1][2] : al[12]['76647426'][3],
rawUrl: al[1][0],
_parent: this
});
Expand Down

0 comments on commit bc5604d

Please sign in to comment.