Berlin (Q64) has an “official name” statement with an “imported from” reference. “official name” (P1448) has no constraints defined, “imported from” (P143) does. As a result, the wbcheckconstraints API response for this contains no mainsnak member (there was no MainSnakContext to create it), but does contain a reference member with check results. The gadget currently assumes that a statement result always includes a mainsnak, and therefore fails for this response (TypeError: cannot read property results of undefined).
I’m not sure where we need to fix this. Should the gadget be fixed to cope with this situation? Or should the API be updated to always include a mainsnak, with a potentially empty results array? (And, for consistency, probably the same for qualifiers and references.)