diff --git a/ols-demo/index.html b/ols-demo/index.html
index 7515d42..7e8c7d9 100644
--- a/ols-demo/index.html
+++ b/ols-demo/index.html
@@ -2056,10 +2056,7 @@
Examples:
params['simplifyThreshold'] = $('#simplifyThreshold').val();
}
- if($('#snapDistanceChk').is(':checked')) {
- params['snapDistance'] = "true";
- }
- if(!isNaN( $('#snapDistance').val()) ) {
+ if($('#snapDistanceChk').is(':checked') && !isNaN( $('#snapDistance').val()) ) {
params['snapDistance'] = $('#snapDistance').val();
}