Skip to content

Commit

Permalink
Use native Object.assign(), if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Aug 12, 2014
1 parent 28fe5f6 commit 2316ff9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1595,12 +1595,16 @@ var privateTab = {
var logPrefix = "dontSaveClosedPrivateTabs(" + dontSave + "): ";
if(dontSave) {
var _this = this;
var shallowCopy = function(o) {
var out = {};
for(var p in o)
out[p] = o[p];
return out;
};
var shallowCopy = "assign" in Object
? function(o) {
return Object.assign({}, o);
}
: function(o) {
var out = {};
for(var p in o)
out[p] = o[p];
return out;
};
var filterPrivateWindowsAndTabs = function privateTabWrapper(browserState) {
var windows = browserState.windows;
windows && windows.forEach(function(windowState, i) {
Expand Down

0 comments on commit 2316ff9

Please sign in to comment.