Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

html template is missing in google-map #433

@tenacious-joy

Description

@tenacious-joy

When google-map is imported in a polymer 3 element, it produces the following error:

element-mixin.js:362 template getter must return HTMLTemplateElement
Uncaught TypeError: Cannot read property 'api' of undefined

It occurs in chrome.

It can be fixed by:

  1. Importing html from html-tag.js
  2. And return the template as html template.

Fix:
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
Change Polymer({
_template: [[some html]]
}) to

Polymer({
_template: html[[some html]]
})

Had to fix this inside node_modules which cannot be pushed to production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions