Lines of Code | 27 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import template from './template.html'; |
||
2 | import './style.scss'; |
||
3 | |||
4 | export class Control { |
||
5 | constructor( options ) { |
||
6 | this.options = _.defaults( options || {}, { |
||
|
|||
7 | name: _.random( 0, 10000 ), |
||
8 | label: 'My Checkbox' |
||
9 | } ); |
||
10 | |||
11 | this.template = _.template( template ); |
||
12 | } |
||
13 | |||
14 | /** |
||
15 | * Create a checkbox and return the html. |
||
16 | * |
||
17 | * @since 1.0.0 |
||
18 | * |
||
19 | * @return {jQuery} Control created. |
||
20 | */ |
||
21 | render() { |
||
22 | this.$element = $( this.template( this.options ) ); |
||
23 | this.$input = this.$element.find( 'input' ); |
||
24 | |||
25 | return this.$element; |
||
26 | } |
||
27 | } |
||
28 |
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.