Displaying the menu only to members I've got this bit of code
<app-drawer-layout fullbleed>
<!-- Drawer content -->
<template is="dom-if" if="{{signedIn}}">
<app-drawer>
....
This displays the menu only when users are logged in to the application. It works fine but is there anyway to remove the error it causes in the console.
error:
polymer-mini.html:2046 Uncaught TypeError: Cannot read property 'getWidth' of undefined
The layout logic in
<app-drawer-layout>
requires an<app-drawer>
to determine the appropriate container margins. I don't see an option to disable that logic.A workaround for the error you're seeing is to create an empty
<app-drawer>
by moving thedom-if
inside the<app-drawer>
:This unfortunately would create a blank drawer before the user signs in, but maybe this is acceptable for your app. codepen