@samitouri / QOS-React / commits / f9377c1762

Replaced object building loop with Object.assign function (#12414)

Barry Michael Doyle committed Mar 21, 2018 at 15:45 UTC f9377c1762a0bf680cde73e9433350279bbd353c
1 file changed +1 -3
packages/react-dom/src/events/__tests__/BeforeInputEventPlugin-test.js
+1 -3
@@ -43,9 +43,7 @@ describe('BeforeInputEventPlugin', () => {
43
44 function simulateEvent(elem, type, data) {
45 const event = new Event(type, {bubbles: true});
46 - Object.keys(data).forEach(key => {
47 - event[key] = data[key];
48 - });
46 + Object.assign(event, data);
47 elem.dispatchEvent(event);
48 }
49