fix typo, which results in JS crash

data is undefined here, the correct name is viewHeir