Skip to content

Instantly share code, notes, and snippets.

@theredpea
Created October 18, 2018 18:39
Show Gist options
  • Save theredpea/a749a05984f7c098a3231d6eb1363c1d to your computer and use it in GitHub Desktop.
Save theredpea/a749a05984f7c098a3231d6eb1363c1d to your computer and use it in GitHub Desktop.
function syncSheet(app, def, list) {
extend(def.qProperty.qMetaDef, blueprintTag)
if (list.indexOf(def.qProperty.qInfo.qId) === -1) {
return app.createObject(def.qProperty).then(function(handle) {
return handle.setFullPropertyTree(def).then(function() { return handle.publish(); });
})
} else {
return app.getObject(def.qProperty.qInfo.qId).then(function(handle) {
return handle.setFullPropertyTree(def).then(function() { return handle.publish(); });
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment