Error on page with custom cms lightbox

Share Link:(notice error when you inspect page)
https://preview.webflow.com/preview/sallycorp?preview=a4cd72f136a1349bafeac077380f45f3

Hi everybody! We implemented a custom cms image lightbox for our client, using a code we found in the forms. The problem is that it looks as though we are getting this error in the inspector:

Uncaught TypeError: Cannot read property ‘innerHTML’ of undefined
at north-pole-adventure:47

I think this is also causing the Gallery page to crash on Tablets… Please any help would be greatly appreciated!

Code can be found in the page settings for header and before body

There is no element with class collection-subtitle on that page. Where did you copy the code from?

I believe from here? Dynamic Lightbox with CMS Workaround - Works Perfectly - #15 by jbleroux

I don’t see collection-subtitle in that topic either. Do you know what collection-subtitle is supposed to be?

Screenshot_2017-08-03_230855

ehh sorry. No idea then. Not sure where it came from! Should i just delete a part of the code if it is not doing anything?

Well if you just delete that line, anything depending on that line may break and so forth… I suggest removing all custom code unless you know what it’s doing.