0👍
✅
beforeUpdate
does not look like the right hook. You probably should be using mounted
.
Also, your variable map
is out of scope for your getPitch
method.
Source:stackexchange.com