Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Merge pull request #37 from OSWeekends/hotfox
Browse files Browse the repository at this point in the history
Fix. #36
  • Loading branch information
UlisesGascon authored Jan 19, 2018
2 parents 16b2162 + 7aae9f3 commit 68bf627
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions js/memezinga.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,17 @@ var app = {
insertSelectedImage:function () {
var imagePreview = document.querySelector('.preview-image');
var selectedImageId = app.tools.getImageId();
var memeList = JSON.parse(sessionStorage.getItem('memes')).data.memes;
memeList.forEach(function (element) {
if (element.id === selectedImageId) {
app.tools.toDataURL(element.url,function (base64) {
imagePreview.src = base64;
})
}
});
if(sessionStorage.getItem('memes')){
var memeList = JSON.parse(sessionStorage.getItem('memes')).data.memes;
memeList.forEach(function (element) {
if (element.id === selectedImageId) {
app.tools.toDataURL(element.url,function (base64) {
imagePreview.src = base64;
})
}
});
}

},

/**
Expand Down

0 comments on commit 68bf627

Please sign in to comment.