Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html template is missing in google-map #433

Open
tenacious-joy opened this issue Nov 18, 2018 · 3 comments
Open

html template is missing in google-map #433

tenacious-joy opened this issue Nov 18, 2018 · 3 comments

Comments

@tenacious-joy
Copy link

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.

@anoopsharma010395
Copy link

Hi your issue is still there or code is available in production.?

@mshockwave
Copy link

The issue is still there. Importing html seems to be the only solution :-(

@simonh1000
Copy link

Just run into this bug as well - the fix is simple enough (as described above) but now I've had to copy this library into my code and make the edit (as well as changing several import statements). I can see that is has been left untouched for a long time already but hope it gets addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants