@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
16 lines • 750 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWebPartHistoryOnInit = void 0;
var Functions_1 = require("./Functions");
function getWebPartHistoryOnInit(userDisplayName, webpartHistory) {
//ADDED FOR WEBPART HISTORY: This sets the webpartHistory
var thisHistoryInstance = (0, Functions_1.createWebpartHistory)('onInit', 'new', userDisplayName);
var priorHistory = webpartHistory ? (0, Functions_1.upgradeV1History)(webpartHistory).history : [];
var newWebPartHistory = {
thisInstance: thisHistoryInstance,
history: priorHistory,
};
return newWebPartHistory;
}
exports.getWebPartHistoryOnInit = getWebPartHistoryOnInit;
//# sourceMappingURL=OnInit.js.map
;