Cannot read property ‘substring’ of undefined in Vue

This is because the data in the page has not yet been loaded when substrings are used.

Error code:

you can use the v – if
is amended as:

Read More: