Skip to content

Commit b428b92

Browse files
committed
Changed Object.assign's order to allow user provided keys to be used
1 parent f28597e commit b428b92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/generatePropsFromAttributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import inlineStyleToObject from './inlineStyleToObject';
1010
export default function generatePropsFromAttributes(attributes, key) {
1111

1212
// generate props
13-
const props = Object.assign({}, htmlAttributesToReact(attributes), { key });
13+
const props = Object.assign({ key }, htmlAttributesToReact(attributes));
1414

1515
// if there is an inline/string style prop then convert it to a React style object
1616
// otherwise, it is invalid and omitted

0 commit comments

Comments
 (0)