You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two <app-indexeddb-mirror>s loading responses from two different <iron-ajax> calls. Both seem to work fine in build/bundled, until I take the app offline in dev tools or disconnect from WiFi.
Then only one of the dom-repeats, populated by its respective <app-indexddb-mirror>, renders on the page when I turn the network off, even though I can see the data from both responses in Dev Tools > Application > IndexDB.
<iron-ajax
id="userData"
url="api-url/users"
handle-as="json"
last-response="{{response_user}}"
on-response="getUserDataComplete">
</iron-ajax>
<iron-ajax
id="podcastData"
url="api-url/podcasts"
handle-as="json"
last-response="{{response_podcasts}}"
on-response="getPodcastDataComplete">
</iron-ajax>
<app-indexeddb-mirror
key="userData"
data="{{response_user}}"
persisted-data="{{persistedUserData}}">
</app-indexeddb-mirror>
<app-indexeddb-mirror
key="podcastData"
data="{{response_podcasts}}"
persisted-data="{{persistedPodcastData}}">
</app-indexeddb-mirror>
<!-- only this dom-repeat works in build/bundled when "offline" -->
<template is="dom-repeat" items="{{persistedUserData}}" as="user">
<div>[[user.name]]</div>
<div>[[user.slug]]</div>
</template>
<template is="dom-repeat" items="{{persistedPodcastData}}" as="podcast">
<div>[[podcast.title.rendered]]</div>
<audio src="[[podcast.acf.podcast_file]]" controls></audio>
</template>
Values in Dev Tools > Application > IndexDB:
key value
"userData" Array[1]
"podcastData" Array[10]
Any ideas as to why only one of the dom-repeats is rendering when offline?
The text was updated successfully, but these errors were encountered:
I have two
<app-indexeddb-mirror>
s loading responses from two different<iron-ajax>
calls. Both seem to work fine inbuild/bundled
, until I take the app offline in dev tools or disconnect from WiFi.Then only one of the
dom-repeats
, populated by its respective<app-indexddb-mirror>
, renders on the page when I turn the network off, even though I can see the data from both responses in Dev Tools > Application > IndexDB.Values in Dev Tools > Application > IndexDB:
key value
"userData" Array[1]
"podcastData" Array[10]
Any ideas as to why only one of the
dom-repeats
is rendering when offline?The text was updated successfully, but these errors were encountered: