mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-02 06:35:04 +00:00
refactor Components props extracting
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import React, {Component, PropTypes} from 'react';
|
||||
import Path from './Path';
|
||||
import {pathProps} from '../lib/props';
|
||||
import _ from 'lodash';
|
||||
|
||||
class Polyline extends Component{
|
||||
export default class extends Component{
|
||||
static displayName = 'Polyline';
|
||||
static propTypes = {
|
||||
...pathProps,
|
||||
@@ -20,7 +19,7 @@ class Polyline extends Component{
|
||||
|
||||
render() {
|
||||
let points = this.props.points;
|
||||
if (_.isArray(points)) {
|
||||
if (Array.isArray(points)) {
|
||||
points = points.join(',');
|
||||
}
|
||||
|
||||
@@ -31,4 +30,3 @@ class Polyline extends Component{
|
||||
/>;
|
||||
}
|
||||
}
|
||||
export default Polyline;
|
||||
|
||||
Reference in New Issue
Block a user