Skip to content

Commit dcd2c32

Browse files
agataludwigdougwilson
authored andcommitted
Fix error creating objects in some environments
fixes #52 closes #53
1 parent b164ceb commit dcd2c32

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
unreleased
2+
==========
3+
4+
* Fix error creating objects in some environments
5+
16
2018-07-30 / 1.7.0
27
==================
38

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ function createServerErrorConstructor (HttpError, name, code) {
228228
function nameFunc (func, name) {
229229
var desc = Object.getOwnPropertyDescriptor(func, 'name')
230230

231-
if (desc.configurable) {
231+
if (desc && desc.configurable) {
232232
desc.value = name
233233
Object.defineProperty(func, 'name', desc)
234234
}

0 commit comments

Comments
 (0)