mirror of
https://github.com/esiur/esiur-js.git
synced 2025-06-27 15:23:11 +00:00
1.6.0
This commit is contained in:
@ -18,14 +18,14 @@ export default class ResourceProxy
|
||||
for(var i = 0; i < template.properties.length; i++)
|
||||
{
|
||||
let pt = template.properties[i];
|
||||
let desc = Object.getOwnPropertyDescriptor(Payment.prototype, pt.name);
|
||||
let desc = Object.getOwnPropertyDescriptor(type.prototype, pt.name);
|
||||
if (desc)
|
||||
{
|
||||
code += `\r\n set ${pt.name}(v) { \r\n if (this.instance) this.instance.emitModification(this.instance.template.properties[${i}], v); \r\n super.${pt.name} = v; } \r\n get ${pt.name}() { \r\n return super.${pt.name};}`;
|
||||
}
|
||||
else
|
||||
{
|
||||
code += `\r\n set ${pt.name}(v) { \r\n if (this.instance) this.instance.emitModification(this.instance.template.properties[${i}], v); \r\n super._${pt.name} = v; } \r\n get ${pt.name}() { \r\n return super._${pt.name};}`;
|
||||
code += `\r\n set ${pt.name}(v) { \r\n if (this.instance) this.instance.emitModification(this.instance.template.properties[${i}], v); \r\n this._${pt.name} = v; } \r\n get ${pt.name}() { \r\n return this._${pt.name};}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user