Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
GlobalListener.prototype.handleSaveTypeForm = function(event) {
var tObj = utils.getTiddler(event.paramObject.output);
if(!tObj) return;
var mode = event.paramObject.mode;
var type = (mode === "manage-edge-types"
? new EdgeType(tObj.fields.id)
: new NodeType(tObj.fields.id));
if(utils.isTrue(tObj.fields["temp.deleteType"], false)) {
this.deleteType(mode, type, tObj);
} else {
this.saveType(mode, type, tObj);
}
};
const handleSaveTypeForm = ({paramObject}) => {
const tObj = utils.getTiddler(paramObject.output);
if (!tObj) return;
const id = tObj.fields.id;
const mode = paramObject.mode;
if (utils.isTrue(tObj.fields['temp.deleteType'], false)) {
deleteType(mode, id, tObj);
} else {
saveType(mode, id, tObj);
}
};