JS, add control against cropping without crops