Skip to content

Commit a90fb8a

Browse files
author
Vlad Balin
committed
attrSpec.options must be untouched
1 parent 7f0153f commit a90fb8a

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "type-r",
3-
"version": "1.0.0-rc93",
3+
"version": "1.0.0-rc94",
44
"description": "Reactive objects with transactional updates and automatic serialization",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/record/attributes/generic.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,12 @@ export class AnyType implements Attribute {
135135
tools.log[ level ]( `[Attribute Update] ${ record.getClassName() }.${ this.name }: ` + text, value, 'Attributes spec:', record._attributes );
136136
}
137137

138-
constructor( public name : string, a_options : ExtendedAttributeDescriptor ) {
138+
constructor( public name : string, a_options : ExtendedAttributeDescriptor ) {
139+
// Save original options...
140+
this.options = a_options;
141+
139142
// Clone options.
140-
const options : ExtendedAttributeDescriptor = this.options = assign( { getHooks : [], transforms : [], changeHandlers : [] }, a_options );
143+
const options : ExtendedAttributeDescriptor = assign( { getHooks : [], transforms : [], changeHandlers : [] }, a_options );
141144
options.getHooks = options.getHooks.slice();
142145
options.transforms = options.transforms.slice();
143146
options.changeHandlers = options.changeHandlers.slice();

0 commit comments

Comments
 (0)