fix asset.type undefined js error