Skip to content

Commit

Permalink
Fix a bug when loading compact refract attributes; bump to 0.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Nov 24, 2015
1 parent 831ba85 commit 7a654f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.12.1 - 2015-11-24

- Fix a bug when loading refracted attributes from compact refract.

# 0.12.0 - 2015-11-23

- Provide a way for elements to mark attributes as unrefracted arrays of
Expand Down
2 changes: 1 addition & 1 deletion lib/primitives/base-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ module.exports = function(registry) {
this.content = tuple[3];

this.convertAttributesToElements(function(attribute) {
registry.fromCompactRefract(attribute);
return registry.fromCompactRefract(attribute);
});

if (this.element !== tuple[0]) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minim",
"version": "0.12.0",
"version": "0.12.1",
"description": "A library for interacting with JSON through Refract elements",
"main": "lib/minim.js",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions test/subclass-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,10 @@ describe('Minim subclasses', function() {
]
}, null]);
});

it('should round-trip', function() {
const refracted = myElement.toCompactRefract();
expect(myElement.fromCompactRefract(refracted).toCompactRefract()).to.deep.equal(refracted);
});
});
});

0 comments on commit 7a654f6

Please sign in to comment.