Skip to content

Commit

Permalink
Merge pull request #108 from conveyal/dev
Browse files Browse the repository at this point in the history
v3.2.1
  • Loading branch information
trevorgerhardt authored Dec 15, 2016
2 parents c1139e9 + aa651e0 commit 184e667
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions lib/__tests__/babel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* globals describe, expect, it */

describe('babel', () => {
/** As of 2016-12-15 this test fails in babel loose mode. https://github.com/babel/babel/issues/4916 */
it('should iterate correctly over a set after using the spread operator', () => {
const originalArr = [1, 1, 2]
const set = new Set(originalArr)
const arr = [...set]
expect(arr.length).toBe(2)
})
})
2 changes: 1 addition & 1 deletion lib/babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (env) {
presets: [
[babelEnv, {
targets: {browsers},
loose: true
loose: false // Loose mode breaks spread operator on `Set`s
}],
react,
stage2
Expand Down

0 comments on commit 184e667

Please sign in to comment.