Skip to content

Commit

Permalink
Fix error in Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Scholtes committed Sep 13, 2016
1 parent f21f5dc commit 2d2ad7f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 0.9.2 - 2016-09-12
### Fixed
- Fixed thrown exception in Safari.

## 0.9.1 - 2016-09-12
### Fixed
- Works in IE. Removed references to `Symbol` builtin in transpiled code
Expand Down
5 changes: 4 additions & 1 deletion index.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ function namedConstructor (name, Base, props) {

Ctor.prototype = Object.create(Base.prototype)
Ctor.prototype.constructor = Ctor
Object.defineProperty(Ctor, 'name', { value: name })
try {
// Safari throws altough the name property of a function is configurable
Object.defineProperty(Ctor, 'name', { value: name })
} catch (error) {}

return Ctor
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sum-types",
"version": "0.9.1",
"version": "0.9.2",
"description": "Introduction and eliminiation of sum types (or tagged unions)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 2d2ad7f

Please sign in to comment.