Commit bbf38306 authored by Joris's avatar Joris

Don’t show undefined infos

parent 4b3a46d5
Pipeline #78452260 passed with stages
in 2 minutes and 38 seconds
......@@ -11,3 +11,10 @@ application](http://guyonvarch.gitlab.io/mapMarks/).
## Example CSV file
See [public/example.csv](public/example.csv).
## Getting started
```bash
npm install
npm start
```
Subproject commit 4dfeef6943d58bde2d8ea1213250f6e1aa49ef0f
......@@ -1661,12 +1661,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -1681,17 +1683,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -1808,7 +1813,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -1820,6 +1826,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -1834,6 +1841,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -1841,12 +1849,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -1865,6 +1875,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -1945,7 +1956,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -1957,6 +1969,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -2078,6 +2091,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......
......@@ -14,7 +14,7 @@
"scripts": {
"start": "npm run server & npm run watch",
"server": "http-server ./public -p 8080 --silent",
"watch": "watchify scripts/main.js -o public/main.js -dv -t [ babelify --presets es2015 ]",
"build": "browserify scripts/main.js -o public/main.js -t [ babelify --presets [ es2015 ] ]"
"watch": "watchify src/main.js -o public/main.js -dv -t [ babelify --presets es2015 ]",
"build": "browserify src/main.js -o public/main.js -t [ babelify --presets [ es2015 ] ]"
}
}
......@@ -62,7 +62,12 @@ function getDescription(mark) {
? `<div><b><a href=${link}>${name}</a></b></div>`
: `<div><b>${name}</b></div>`
return `${nameElement}<div>${infos}</div>`
const infosElement =
infos !== undefined
? `<div>${infos}</div>`
: ''
return `${nameElement}${infosElement}`
}
function getInfos(mark) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment