Total Complexity | 5 |
Complexity/F | 5 |
Lines of Code | 22 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | jaxon.dialogs.pgwjs = { |
||
|
|||
2 | defaults: {maxWidth: 400}, |
||
3 | options: {}, |
||
4 | show: function(args) { |
||
5 | // Set user and default options into data only when they are missing |
||
6 | for(key in jaxon.dialogs.pgwjs.options) |
||
7 | { |
||
8 | if(!(key in args.data)) |
||
9 | { |
||
10 | args.data[key] = jaxon.dialogs.pgwjs.options[key]; |
||
11 | } |
||
12 | } |
||
13 | for(key in jaxon.dialogs.pgwjs.defaults) |
||
14 | { |
||
15 | if(!(key in args.data)) |
||
16 | { |
||
17 | args.data[key] = jaxon.dialogs.pgwjs.defaults[key]; |
||
18 | } |
||
19 | } |
||
20 | $.pgwModal(args.data); |
||
21 | } |
||
22 | }; |
||
23 |
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.