Total Complexity | 2 |
Complexity/F | 1 |
Lines of Code | 27 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | |||
8 | require('./bootstrap'); |
||
9 | |||
10 | /** |
||
11 | * Next, we will create a fresh Vue application instance and attach it to |
||
12 | * the page. Then, you may begin adding components to this application |
||
13 | * or customize the JavaScript scaffolding to fit your unique needs. |
||
14 | */ |
||
15 | |||
16 | Vue.component('example', require('./components/Example.vue')); |
||
|
|||
17 | |||
18 | const app = new Vue({ |
||
19 | el: '#app' |
||
20 | }); |
||
21 | |||
22 | import autosize from 'autosize'; |
||
23 | |||
24 | autosize($('textarea')); |
||
25 | |||
26 | $('.vote-form').submit(e => { |
||
27 | e.preventDefault(); |
||
28 | |||
29 | axios.post(`/votes/${e.target.snippet_id.value}`) |
||
30 | .then(response => { |
||
31 | $(e.target.vote_btn).toggleClass('liked'); |
||
32 | $(e.target.vote_btn).siblings('.like-counter').html(response.data.count); |
||
33 | }); |
||
34 | }); |
||
35 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.