gd-sprest-bs 10.10.78 → 10.10.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webparts/base/wp.js +12 -4
- package/dist/gd-sprest-bs-icons.js +1 -1
- package/dist/gd-sprest-bs-icons.js.LICENSE.txt +85 -85
- package/dist/gd-sprest-bs-icons.min.js +1 -1
- package/dist/gd-sprest-bs.js +1 -1
- package/dist/gd-sprest-bs.js.LICENSE.txt +85 -85
- package/dist/gd-sprest-bs.min.js +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
- package/src/webparts/base/wp.ts +11 -4
|
@@ -165,7 +165,7 @@ var WebPart = function (props) {
|
|
|
165
165
|
*/
|
|
166
166
|
var render = function () {
|
|
167
167
|
// Get the webpart information
|
|
168
|
-
_wp = getWebPartInfo();
|
|
168
|
+
_wp = _wp || getWebPartInfo();
|
|
169
169
|
if (_wp == null || _wp.el == null) {
|
|
170
170
|
// Log
|
|
171
171
|
console.log("[bs-webpart] The target webpart element '" + props.elementId + "' was not found.");
|
|
@@ -230,11 +230,19 @@ var WebPart = function (props) {
|
|
|
230
230
|
props.onPostRender ? props.onPostRender(_wp) : null;
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
//
|
|
234
|
-
|
|
233
|
+
// Get the webpart information
|
|
234
|
+
_wp = getWebPartInfo();
|
|
235
|
+
if (_wp) {
|
|
235
236
|
// Render the component
|
|
236
237
|
render();
|
|
237
|
-
}
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
// Add a load event
|
|
241
|
+
window.addEventListener("load", function () {
|
|
242
|
+
// Render the component
|
|
243
|
+
render();
|
|
244
|
+
});
|
|
245
|
+
}
|
|
238
246
|
// Return the webpart
|
|
239
247
|
return {
|
|
240
248
|
cfg: _cfg,
|