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

Commit

Permalink
Merge pull request #30 from jefrydco/master
Browse files Browse the repository at this point in the history
Remove Lodash from Dependency in Demo
  • Loading branch information
VinceG authored Apr 10, 2019
2 parents ff85f4f + 6ee0b0b commit e3c50cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/src/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<script>
import { WebCam } from "vue-web-cam";
import { find, head } from "lodash";
export default {
name: "App",
components: {
Expand All @@ -65,7 +65,7 @@ export default {
},
computed: {
device: function() {
return find(this.devices, n => n.deviceId == this.deviceId);
return this.devices.find(n => n.deviceId === this.deviceId);
}
},
watch: {
Expand All @@ -74,7 +74,7 @@ export default {
},
devices: function() {
// Once we have a list select the first one
let first = head(this.devices);
const [first, ...tail] = devices;
if (first) {
this.camera = first.deviceId;
this.deviceId = first.deviceId;
Expand Down

0 comments on commit e3c50cd

Please sign in to comment.