FC-1277 Fix JS error when handler is undefined.