Looks like `type` is undefined.