Fix JavaScript error when no variations exist in admin.