Fix date on date-* selector to use .root for shady DOM

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-09-13 00:30:35 -07:00
parent 7a9e05975f
commit 49dd6e8f09

View File

@ -353,8 +353,8 @@
Polymer.dom(this.$.thumbnails).innerHTML = "";
this.next = false;
this.limit = undefined;
this._loadPhotos();
this.memoryDate = window.moment(this.date).format("MMMM Do");
this._loadPhotos();
},
modeChanged: function(mode) {
@ -724,7 +724,7 @@
thumbnail.addEventListener("load-album", this.loadAlbum.bind(this));
datetime = new Date((photo.taken || photo.modified || photo.added) + " GMT").toISOString().replace(/T.*$/, "");
var dateBlock = this.querySelector("#date-" + datetime), thumbnails;
var dateBlock = this.root.querySelector("#date-" + datetime), thumbnails;
if (!dateBlock) {
dateBlock = document.createElement("div");
dateBlock.id = "date-" + datetime;