[Vuejs]-Hiding frame: TypeError: Cannot read properties of undefined (reading 'add')

0👍

One solutions it is when there’s only one element with the fc_frame class, you can use querySelector instead of getElementsByClassName.
like that:
var element = document.querySelector(".fc_frame");

IquerySelector returns the first element with the fc_frame class (or null if there’s no matching element). Then, we add the d-none class to the element’s classList if the element exists.

Leave a comment