Skip to content

Commit bfeb649

Browse files
committed
[fix] Download templates based on hash
1 parent 3fe4d0d commit bfeb649

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pagelet.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Pagelet.prototype.configure = function configure(name, data, roots) {
7878
pagelet.run = data.run; // Pagelet client code.
7979
pagelet.id = data.id; // ID of the pagelet.
8080
pagelet.name = name; // Name of the pagelet.
81+
pagelet.hash = data.hash; // MD5 of templates.
8182

8283
//
8384
// This pagelet was actually part of a parent pagelet, so set a reference to
@@ -151,7 +152,7 @@ Pagelet.prototype.configure = function configure(name, data, roots) {
151152
Pagelet.prototype.template = function template(type) {
152153
type = type || 'client';
153154

154-
return this.bigpipe.templates[type +'@'+ this.id];
155+
return this.bigpipe.templates[this.hash[type]];
155156
};
156157

157158
/**

0 commit comments

Comments
 (0)