Skip to content

Commit

Permalink
Don't parse data twice in case of not yet initialized remote frame
Browse files Browse the repository at this point in the history
(#38)
  • Loading branch information
Infocatcher committed Aug 21, 2015
1 parent c2a06d7 commit d29c376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Session_Bookmarks/sessionBookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,6 @@ this.bookmarks = {
setTabSession: function(tab, ssData, uri, mergeHistory, disableForceLoad, _isPrivate) {
var data;
if(ssData && "JSON" in window) try {
data = JSON.parse(ssData);
// For better compatibility with Private Tab extension
let privateAttr = "privateTab-isPrivate";
let isPrivate = _isPrivate || false;
Expand All @@ -1233,6 +1232,7 @@ this.bookmarks = {
mm.loadFrameScript("data:application/javascript," + encodeURIComponent(data), false);
return;
}
data = JSON.parse(ssData);
if(isPrivate) {
if(!data.attributes)
data.attributes = {};
Expand Down

0 comments on commit d29c376

Please sign in to comment.