Passed
Push — master ( 61dd3f...482d1b )
by greg
01:51
created

src/cli/cms/templates/handlebars/notEmpty.js   A

Complexity

Total Complexity 4
Complexity/F 4

Size

Lines of Code 7
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 4
c 1
b 0
f 0
nc 1
mnd 1
bc 3
fnc 1
dl 0
loc 7
rs 10
bpm 3
cpm 4
noi 1
1
2
/**
3
 */
4
export default function notEmpty(variable) {
5
  if (typeof variable !== 'undefined' && variable !== null && variable !== '') {
6
    return block.fn(this)
0 ignored issues
show
Bug introduced by
The variable block seems to be never declared. If this is a global, consider adding a /** global: block */ comment.

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.

Loading history...
7
  }else {
8
    return ''
9
  }
10
}
11