Skip to content

Commit 31c5389

Browse files
authored
Merge pull request #92 from go-spatial/dev
Bug fix
2 parents ee65f3d + 9f57a3e commit 31c5389

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/component/Property/PropertyBool.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ class PropertyBool extends React.Component {
99

1010
handleChange = async ({value})=>{
1111
const {handle, name, path} = this.props
12-
if (handle && handle.change) return handle.change({name, path, value})
12+
let val = value
13+
if (value === 'true') val = true
14+
if (value === 'false') val = false
15+
if (handle && handle.change) return handle.change({name, path, value: val})
1316
await modelStyle.actions.setIn({
1417
path,
15-
value,
18+
value: val,
1619
})
1720
}
1821

0 commit comments

Comments
 (0)