Skip to content

Commit cf39eaa

Browse files
committed
修改es6语法
1 parent 0019842 commit cf39eaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/template/example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
var notFor = ['iClient Classic', '3D-WebGL'];
4343
var productArr = ['Leaflet', 'OpenLayers', 'MapboxGL', 'MapLibreGL', 'component', 'iClient Classic', '3D-WebGL']
4444
var path = window.location.pathname.split('/');
45-
var identification = productArr.find(name => name.toLowerCase().includes(path[2]) || name.toLowerCase().includes(path[3]));
45+
var identification = productArr.filter(function(name) { return name.toLowerCase().includes(path[2]) || name.toLowerCase().includes(path[3]) })[0];
4646
if (identification) {
4747
var suffixHeader = document.getElementById('suffix-title');
4848
suffixHeader.innerText = (notFor.indexOf(identification) < 0 ? 'for ' : '') + identification;

0 commit comments

Comments
 (0)