fix js error on table detail with no preview table