GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( c140ca...f74f0c )
by Dennis
01:59
created

demo.js   A

Complexity

Total Complexity 6
Complexity/F 1.5

Size

Lines of Code 16
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 0
c 1
b 0
f 1
nc 2
dl 0
loc 16
rs 10
wmc 6
mnd 1
bc 6
fnc 4
bpm 1.5
cpm 1.5
noi 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A targets.filter 0 12 1
1
var targets = Object.keys(document.querySelectorAll('[data-vanillatrigger]')).map(function(index) {
2
	return document.querySelectorAll('[data-vanillatrigger]')[index];
3
});
4
5
targets.filter(function(item) {
6
	item.addEventListener('click', function() {
7
		if(typeof item.value === 'undefined' || item.value === "") {
8
			targets.filter(function(item) {
9
				item.checked = false;
10
				return item.classList.remove('is-active');
11
			})
0 ignored issues
show
Best Practice introduced by
There is no return statement in this branch, but you do return something in other branches. Did you maybe miss it? If you do not want to return anything, consider adding return undefined; explicitly.
Loading history...
12
		} else {
13
			return item.classList.toggle('is-active');
14
		}
15
	});
16
});
17