Home link active on cpt with archives

in my main nav menu i have HOME linked to URL ‘/’.

This is causing it to be active on custom post types which have archives. I corrected this by making the change below in /lib/nav.php.

did i go about this the wrong way?

thank you in advance! bkc

/lib/nav.php my line 73:

if ($element->is_active) {
  $element->classes[] = 'active';
}

changed to:

if ($element->is_active && $element->url !== '/') {
  $element->classes[] = 'active';
}