Lint curly braces

This commit is contained in:
Tom Russell 2019-05-27 16:20:00 +01:00
parent 59f69d0012
commit ebc662280c
4 changed files with 9 additions and 6 deletions

View File

@ -153,6 +153,6 @@ class ColouringMap extends Component {
</Fragment>
);
}
};
}
export default ColouringMap;

View File

@ -10,8 +10,9 @@
* @returns {number} integer or NaN
*/
function strictParseInt(value) {
if (/^([1-9][0-9]*)$/.test(value))
if (/^([1-9][0-9]*)$/.test(value)) {
return Number(value);
}
return NaN;
}

View File

@ -129,7 +129,9 @@ const MAP_STYLE_TABLE_DEFINITIONS = {
}
// register datasource adapters for mapnik database connection
if (mapnik.register_default_input_plugins) mapnik.register_default_input_plugins();
if (mapnik.register_default_input_plugins) {
mapnik.register_default_input_plugins();
}
// register fonts for text rendering
mapnik.register_default_fonts();
@ -168,13 +170,13 @@ function render_tile(tileset, z, x, y, geometry_id, cb) {
path.join(__dirname, '..', 'map_styles', 'polygon.xml'),
{ strict: true },
function (err, map) {
if (err) throw err
if (err) {throw err}
map.add_layer(layer)
const im = new mapnik.Image(map.width, map.height)
map.extent = bbox
map.render(im, {}, (err, rendered) => {
if (err) throw err
if (err) {throw err}
rendered.encode('png', cb)
});
}

View File

@ -206,7 +206,7 @@ function handle_highlight_tile_request(req, res) {
}
render_tile('highlight', int_z, int_x, int_y, geometry_id, function (err, im) {
if (err) throw err
if (err) {throw err}
res.writeHead(200, { 'Content-Type': 'image/png' })
res.end(im)