Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 2ab63ce

Browse files
authored
Merge pull request #44 from timse/assign-options-to-empty-object
Assign options to empty object
2 parents 335b9f6 + a212a5a commit 2ab63ce

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function syncEvent(node, eventName, newEventHandler) {
2727
}
2828

2929
export default function (CustomElement, opts) {
30-
opts = assign(defaults, opts);
30+
opts = assign({}, defaults, opts);
3131
const tagName = (new CustomElement()).tagName;
3232
const displayName = pascalCase(tagName);
3333
const { React, ReactDOM } = opts;

test/unit/errors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ describe('prop-types', () => {
55

66
it('no react', () => {
77
expect(() => reactify(document.registerElement('x-errors-1'), { React: null })).to.throw(msg);
8+
expect(() => reactify(document.registerElement('x-no-errors-1'))).to.not.throw(msg);
89
});
910

1011
it('no react-dom', () => {
1112
expect(() => reactify(document.registerElement('x-errors-2'), { ReactDOM: null })).to.throw(msg);
13+
expect(() => reactify(document.registerElement('x-no-errors-2'))).to.not.throw(msg);
1214
});
1315
});

0 commit comments

Comments
 (0)