From: Steve Coast Date: Tue, 8 May 2007 07:53:39 +0000 (+0000) Subject: return blank if no nodes found X-Git-Tag: live~9083 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ec328801e9c5b0d83d646dbbaf6a10c79223019a?hp=220ad0a6b6a8154692a404c443402252dd361168 return blank if no nodes found --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index bb135a01f..820a5cb66 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -60,6 +60,11 @@ class ApiController < ApplicationController report_error("You requested too many nodes (limit is 50,000). Either request a smaller area, or use planet.osm") end + if node_ids.length == 0 + render :text => '' + return + end + # grab the segments segments = Array.new if node_ids.length > 0