Object.values polyfill
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
b082278f04
commit
5647f85a3c
|
@ -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…
Reference in New Issue