Skip to content

Commit b95f7ef

Browse files
committed
fix web detection
1 parent c200d6f commit b95f7ef

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/app/services/photo.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export class PhotoService {
2121
const photos = await Storage.get({ key: this.PHOTO_STORAGE });
2222
this.photos = JSON.parse(photos.value) || [];
2323

24-
if (this.platform.is('pwa')) {
24+
// If running on the web...
25+
if (!this.platform.is('hybrid')) {
2526
// Display the photo by reading into base64 format
2627
for (let photo of this.photos) {
2728
// Read each saved photo's data from the Filesystem
@@ -34,6 +35,9 @@ export class PhotoService {
3435
photo.base64 = `data:image/jpeg;base64,${readFile.data}`;
3536
}
3637
}
38+
else {
39+
console.log(this.platform.platforms());
40+
}
3741
}
3842

3943
/* Use the device camera to take a photo:

0 commit comments

Comments
 (0)