From b428b92c01d907bf6e1de87e3f598362aa5e3b19 Mon Sep 17 00:00:00 2001 From: David Mann Date: Thu, 28 Jun 2018 11:00:11 -0600 Subject: [PATCH] Changed Object.assign's order to allow user provided keys to be used --- src/utils/generatePropsFromAttributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/generatePropsFromAttributes.js b/src/utils/generatePropsFromAttributes.js index 2f64fa0..30a9e03 100644 --- a/src/utils/generatePropsFromAttributes.js +++ b/src/utils/generatePropsFromAttributes.js @@ -10,7 +10,7 @@ import inlineStyleToObject from './inlineStyleToObject'; export default function generatePropsFromAttributes(attributes, key) { // generate props - const props = Object.assign({}, htmlAttributesToReact(attributes), { key }); + const props = Object.assign({ key }, htmlAttributesToReact(attributes)); // if there is an inline/string style prop then convert it to a React style object // otherwise, it is invalid and omitted