Skip to content

Commit

Permalink
fix: use lodash.get to access column width data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed May 27, 2019
1 parent 28e6a2d commit ca1b58c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as React from "react";
import { compose, withHandlers, pure, setDisplayName } from "recompose";
import { connect } from "webiny-app-cms/editor/redux";
import { css } from "emotion";
import { get } from "lodash";
import styled from "react-emotion";
import DropZone from "webiny-app-cms/editor/components/DropZone";
import Resizer from "webiny-app-cms/editor/components/Resizer";
Expand Down Expand Up @@ -58,7 +59,7 @@ const RowChild = pure(
return (
<ColumnContainer
data-type="row-column-container"
style={{ width: (element.data.width || 100) + "%", position: "relative" }}
style={{ width: get(element, "data.width", 100) + "%", position: "relative" }}
>
{index > 0 && (
<Resizer
Expand Down

0 comments on commit ca1b58c

Please sign in to comment.