{"action":"closed","number":10,"pull_request":{"url":"https://api.github.com/repos/filebrowser/frontend/pulls/10","id":194001610,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MDAxNjEw","html_url":"https://github.com/filebrowser/frontend/pull/10","diff_url":"https://github.com/filebrowser/frontend/pull/10.diff","patch_url":"https://github.com/filebrowser/frontend/pull/10.patch","issue_url":"https://api.github.com/repos/filebrowser/frontend/issues/10","number":10,"state":"closed","locked":false,"title":"Use of index as key in a v-for directive to prevent following errors","user":{"login":"beatgrabe","id":11720107,"node_id":"MDQ6VXNlcjExNzIwMTA3","avatar_url":"https://avatars0.githubusercontent.com/u/11720107?v=4","gravatar_id":"","url":"https://api.github.com/users/beatgrabe","html_url":"https://github.com/beatgrabe","followers_url":"https://api.github.com/users/beatgrabe/followers","following_url":"https://api.github.com/users/beatgrabe/following{/other_user}","gists_url":"https://api.github.com/users/beatgrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/beatgrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beatgrabe/subscriptions","organizations_url":"https://api.github.com/users/beatgrabe/orgs","repos_url":"https://api.github.com/users/beatgrabe/repos","events_url":"https://api.github.com/users/beatgrabe/events{/privacy}","received_events_url":"https://api.github.com/users/beatgrabe/received_events","type":"User","site_admin":false},"body":"Olá,\r\n\r\nI recently used the filebrowser and ran into an issue which I try to solve by my PR. Unfortunately I was not really able to fully set up a development environment (runnig your go backend alongside the frontend) to debug the problem actually. So I try to explain what I discovered:\r\n\r\n- Assuming a deeper folder structure like `/static/test/static/src/images/png` leads into duplicate folder names which are then used to index the `v-for` directive by using the `:key` directive (usually you get `console.warn` outputs from `Vue` itsself in a development build if you are doing so…)\r\n- `Vue` itself recommends to use unique keys therefor, see [docs](https://vuejs.org/v2/guide/list.html#key)\r\n- In your `Files.vue` located under `/src/views` you limit the breadcrumb count to a maximum of 4 by using ellipsis (`…`) [code reference](https://github.com/filebrowser/frontend/blob/master/src/views/Files.vue#L97)\r\n- The combination of duplicate names and abbreviated breadcrumbs now leads into an error on back navigation by clicking on browser history's back button like in `chrome` at the upper left corner:\r\n\r\n```\r\nvue.esm.js:1717 TypeError: Cannot read property 'key' of undefined\r\n    at dn (vue.esm.js:5370)\r\n    at b (vue.esm.js:5752)\r\n    at k (vue.esm.js:5840)\r\n    at b (vue.esm.js:5726)\r\n    at k (vue.esm.js:5840)\r\n    at a.__patch__ (vue.esm.js:6000)\r\n    at a.e._update (vue.esm.js:2647)\r\n    at a.r (vue.esm.js:2765)\r\n    at pa.get (vue.esm.js:3115)\r\n    at pa.run (vue.esm.js:3192)\r\n```\r\n\r\nAfter that, you will need to do a full page reload to proceed working…\r\n\r\nI did a screen to gif record to capture the procees to reproduce the bug:\r\n\r\n![fb_bug](https://user-images.githubusercontent.com/11720107/41237803-bb510282-6d94-11e8-8f0f-c917bbd98a7d.gif)\r\n\r\nI hope this will help to understand the problem!\r\n\r\nAdeus!","created_at":"2018-06-11T14:34:25Z","updated_at":"2018-06-27T07:48:17Z","closed_at":"2018-06-27T07:48:17Z","merged_at":"2018-06-27T07:48:17Z","merge_commit_sha":"2bb9171e3260896eca7bcf807a4be1895b7f23a6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/filebrowser/frontend/pulls/10/commits","review_comments_url":"https://api.github.com/repos/filebrowser/frontend/pulls/10/comments","review_comment_url":"https://api.github.com/repos/filebrowser/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/filebrowser/frontend/issues/10/comments","statuses_url":"https://api.github.com/repos/filebrowser/frontend/statuses/9841e43eec26aa75347e5616a7165f3c2f51bda0","head":{"label":"beatgrabe:fix/unique-key","ref":"fix/unique-key","sha":"9841e43eec26aa75347e5616a7165f3c2f51bda0","user":{"login":"beatgrabe","id":11720107,"node_id":"MDQ6VXNlcjExNzIwMTA3","avatar_url":"https://avatars0.githubusercontent.com/u/11720107?v=4","gravatar_id":"","url":"https://api.github.com/users/beatgrabe","html_url":"https://github.com/beatgrabe","followers_url":"https://api.github.com/users/beatgrabe/followers","following_url":"https://api.github.com/users/beatgrabe/following{/other_user}","gists_url":"https://api.github.com/users/beatgrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/beatgrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beatgrabe/subscriptions","organizations_url":"https://api.github.com/users/beatgrabe/orgs","repos_url":"https://api.github.com/users/beatgrabe/repos","events_url":"https://api.github.com/users/beatgrabe/events{/privacy}","received_events_url":"https://api.github.com/users/beatgrabe/received_events","type":"User","site_admin":false},"repo":{"id":136472741,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY0NzI3NDE=","name":"frontend","full_name":"beatgrabe/frontend","owner":{"login":"beatgrabe","id":11720107,"node_id":"MDQ6VXNlcjExNzIwMTA3","avatar_url":"https://avatars0.githubusercontent.com/u/11720107?v=4","gravatar_id":"","url":"https://api.github.com/users/beatgrabe","html_url":"https://github.com/beatgrabe","followers_url":"https://api.github.com/users/beatgrabe/followers","following_url":"https://api.github.com/users/beatgrabe/following{/other_user}","gists_url":"https://api.github.com/users/beatgrabe/gists{/gist_id}","starred_url":"https://api.github.com/users/beatgrabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beatgrabe/subscriptions","organizations_url":"https://api.github.com/users/beatgrabe/orgs","repos_url":"https://api.github.com/users/beatgrabe/repos","events_url":"https://api.github.com/users/beatgrabe/events{/privacy}","received_events_url":"https://api.github.com/users/beatgrabe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/beatgrabe/frontend","description":"Vue based front-end for File Manager.","fork":true,"url":"https://api.github.com/repos/beatgrabe/frontend","forks_url":"https://api.github.com/repos/beatgrabe/frontend/forks","keys_url":"https://api.github.com/repos/beatgrabe/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/beatgrabe/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/beatgrabe/frontend/teams","hooks_url":"https://api.github.com/repos/beatgrabe/frontend/hooks","issue_events_url":"https://api.github.com/repos/beatgrabe/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/beatgrabe/frontend/events","assignees_url":"https://api.github.com/repos/beatgrabe/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/beatgrabe/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/beatgrabe/frontend/tags","blobs_url":"https://api.github.com/repos/beatgrabe/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/beatgrabe/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/beatgrabe/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/beatgrabe/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/beatgrabe/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/beatgrabe/frontend/languages","stargazers_url":"https://api.github.com/repos/beatgrabe/frontend/stargazers","contributors_url":"https://api.github.com/repos/beatgrabe/frontend/contributors","subscribers_url":"https://api.github.com/repos/beatgrabe/frontend/subscribers","subscription_url":"https://api.github.com/repos/beatgrabe/frontend/subscription","commits_url":"https://api.github.com/repos/beatgrabe/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/beatgrabe/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/beatgrabe/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/beatgrabe/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/beatgrabe/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/beatgrabe/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/beatgrabe/frontend/merges","archive_url":"https://api.github.com/repos/beatgrabe/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/beatgrabe/frontend/downloads","issues_url":"https://api.github.com/repos/beatgrabe/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/beatgrabe/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/beatgrabe/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/beatgrabe/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/beatgrabe/frontend/labels{/name}","releases_url":"https://api.github.com/repos/beatgrabe/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/beatgrabe/frontend/deployments","created_at":"2018-06-07T12:16:28Z","updated_at":"2018-06-07T12:16:30Z","pushed_at":"2018-06-07T12:38:11Z","git_url":"git://github.com/beatgrabe/frontend.git","ssh_url":"git@github.com:beatgrabe/frontend.git","clone_url":"https://github.com/beatgrabe/frontend.git","svn_url":"https://github.com/beatgrabe/frontend","homepage":"","size":503,"stargazers_count":0,"watchers_count":0,"language":"Vue","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"filebrowser:master","ref":"master","sha":"4f1d25fba7324aad1c18110f5eac76d4aced5789","user":{"login":"filebrowser","id":35781395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzgxMzk1","avatar_url":"https://avatars0.githubusercontent.com/u/35781395?v=4","gravatar_id":"","url":"https://api.github.com/users/filebrowser","html_url":"https://github.com/filebrowser","followers_url":"https://api.github.com/users/filebrowser/followers","following_url":"https://api.github.com/users/filebrowser/following{/other_user}","gists_url":"https://api.github.com/users/filebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/filebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filebrowser/subscriptions","organizations_url":"https://api.github.com/users/filebrowser/orgs","repos_url":"https://api.github.com/users/filebrowser/repos","events_url":"https://api.github.com/users/filebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/filebrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":119833639,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk4MzM2Mzk=","name":"frontend","full_name":"filebrowser/frontend","owner":{"login":"filebrowser","id":35781395,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1NzgxMzk1","avatar_url":"https://avatars0.githubusercontent.com/u/35781395?v=4","gravatar_id":"","url":"https://api.github.com/users/filebrowser","html_url":"https://github.com/filebrowser","followers_url":"https://api.github.com/users/filebrowser/followers","following_url":"https://api.github.com/users/filebrowser/following{/other_user}","gists_url":"https://api.github.com/users/filebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/filebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filebrowser/subscriptions","organizations_url":"https://api.github.com/users/filebrowser/orgs","repos_url":"https://api.github.com/users/filebrowser/repos","events_url":"https://api.github.com/users/filebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/filebrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/filebrowser/frontend","description":"Vue based front-end for File Manager.","fork":false,"url":"https://api.github.com/repos/filebrowser/frontend","forks_url":"https://api.github.com/repos/filebrowser/frontend/forks","keys_url":"https://api.github.com/repos/filebrowser/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/filebrowser/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/filebrowser/frontend/teams","hooks_url":"https://api.github.com/repos/filebrowser/frontend/hooks","issue_events_url":"https://api.github.com/repos/filebrowser/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/filebrowser/frontend/events","assignees_url":"https://api.github.com/repos/filebrowser/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/filebrowser/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/filebrowser/frontend/tags","blobs_url":"https://api.github.com/repos/filebrowser/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/filebrowser/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/filebrowser/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/filebrowser/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/filebrowser/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/filebrowser/frontend/languages","stargazers_url":"https://api.github.com/repos/filebrowser/frontend/stargazers","contributors_url":"https://api.github.com/repos/filebrowser/frontend/contributors","subscribers_url":"https://api.github.com/repos/filebrowser/frontend/subscribers","subscription_url":"https://api.github.com/repos/filebrowser/frontend/subscription","commits_url":"https://api.github.com/repos/filebrowser/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/filebrowser/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/filebrowser/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/filebrowser/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/filebrowser/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/filebrowser/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/filebrowser/frontend/merges","archive_url":"https://api.github.com/repos/filebrowser/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/filebrowser/frontend/downloads","issues_url":"https://api.github.com/repos/filebrowser/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/filebrowser/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/filebrowser/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/filebrowser/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/filebrowser/frontend/labels{/name}","releases_url":"https://api.github.com/repos/filebrowser/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/filebrowser/frontend/deployments","created_at":"2018-02-01T12:35:24Z","updated_at":"2018-06-26T16:12:15Z","pushed_at":"2018-06-27T07:48:17Z","git_url":"git://github.com/filebrowser/frontend.git","ssh_url":"git@github.com:filebrowser/frontend.git","clone_url":"https://github.com/filebrowser/frontend.git","svn_url":"https://github.com/filebrowser/frontend","homepage":"","size":588,"stargazers_count":23,"watchers_count":23,"language":"Vue","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":6,"open_issues":2,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/filebrowser/frontend/pulls/10"},"html":{"href":"https://github.com/filebrowser/frontend/pull/10"},"issue":{"href":"https://api.github.com/repos/filebrowser/frontend/issues/10"},"comments":{"href":"https://api.github.com/repos/filebrowser/frontend/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/filebrowser/frontend/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/filebrowser/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/filebrowser/frontend/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/filebrowser/frontend/statuses/9841e43eec26aa75347e5616a7165f3c2f51bda0"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"hacdias","id":5447088,"node_id":"MDQ6VXNlcjU0NDcwODg=","avatar_url":"https://avatars2.githubusercontent.com/u/5447088?v=4","gravatar_id":"","url":"https://api.github.com/users/hacdias","html_url":"https://github.com/hacdias","followers_url":"https://api.github.com/users/hacdias/followers","following_url":"https://api.github.com/users/hacdias/following{/other_user}","gists_url":"https://api.github.com/users/hacdias/gists{/gist_id}","starred_url":"https://api.github.com/users/hacdias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacdias/subscriptions","organizations_url":"https://api.github.com/users/hacdias/orgs","repos_url":"https://api.github.com/users/hacdias/repos","events_url":"https://api.github.com/users/hacdias/events{/privacy}","received_events_url":"https://api.github.com/users/hacdias/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"hacdias"}}