Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Fix iteration over types
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jul 29, 2019
1 parent add29f8 commit 4b85c1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license": "AGPL-3.0",
"scripts": {
"build": "NODE_ENV=production rollup -c",
"watch": "NODE_ENV=production rollup -c --watch",
"watch": "NODE_ENV=development rollup -c --watch",
"lint": "eslint --ext .js,.vue src",
"lint:fix": "eslint --ext .js,.vue src --fix",
"stylelint": "stylelint src",
Expand Down
13 changes: 6 additions & 7 deletions src/components/CollectionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,15 @@ export default {
},
options() {
let options = []
let types = window.OCP.Collaboration.getTypes().sort()
for (let type in types) {
window.OCP.Collaboration.getTypes().sort().forEach((type) => {
options.push({
method: METHOD_CREATE_COLLECTION,
type: types[type],
title: window.OCP.Collaboration.getLabel(types[type]),
class: window.OCP.Collaboration.getIcon(types[type]),
action: () => window.OCP.Collaboration.trigger(types[type])
type,
title: window.OCP.Collaboration.getLabel(type),
class: window.OCP.Collaboration.getIcon(type),
action: () => window.OCP.Collaboration.trigger(type)
})
}
})
for (let index in this.searchCollections) {
if (this.collections.findIndex((collection) => collection.id === this.searchCollections[index].id) === -1) {
options.push({
Expand Down

0 comments on commit 4b85c1a

Please sign in to comment.