fail gracefully if gon not loaded on some pages
Merge pull request #2257 from opf/fix/gon_not_defined_on_some_pages