Object.values polyfill

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/10692/head
John Molakvoæ (skjnldsv) 6 years ago
parent b082278f04
commit 5647f85a3c
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF

@ -558,6 +558,20 @@
}
});
function objectValues(obj) {
var res = [];
for (var i in obj) {
if (obj.hasOwnProperty(i)) {
res.push(obj[i]);
}
}
return res;
}
// polyfill
if (!Object.values) {
Object.values = objectValues;
}
var menuActions = Object.values(this.actions.all).filter(function (action) {
return action.type !== OCA.Files.FileActions.TYPE_INLINE;
});

Loading…
Cancel
Save