Prevent Leaflet from requesting non-existing custom tiles

Setting bounds for the layer solves the problem. Because leaflet will not try to fetch tiles out of the specified bounds

var southWest = L.latLng(13.02504085518189, 80.23609399795532),
northEast = L.latLng(13.026849183135116, 80.23797690868378),
bounds = L.latLngBounds(southWest, northEast);


L.tileLayer('static/b18/{z}/{x}/{y}.png', {
maxZoom:22,
bounds:bounds,
reuseTiles : true,
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);