diff --git a/src/convertToObject.js b/src/convertToObject.js index 62ccb394..b9e7a68f 100644 --- a/src/convertToObject.js +++ b/src/convertToObject.js @@ -6,12 +6,12 @@ * @return {object} */ function convertToObject(sourceString) { - const arrayWithStyles = complexStylesString.split(';') + const arrayWithStyles = sourceString.split(';') .map((el) => el.trim()); const resultObject = {}; - for (const el of arrayWithStyles) { - const pair = el.split(':').map((el) => el.trim()); + for (const elem of arrayWithStyles) { + const pair = elem.split(':').map((el) => el.trim()); resultObject[pair[0]] = pair[1]; }