diff --git a/RNSVG.podspec b/RNSVG.podspec
index 360d481f..cb624334 100644
--- a/RNSVG.podspec
+++ b/RNSVG.podspec
@@ -7,9 +7,9 @@ Pod::Spec.new do |s|
s.version = package['version']
s.summary = package['description']
s.license = package['license']
- s.homepage = 'https://github.com/magicismight/react-native-svg'
+ s.homepage = 'https://github.com/react-native-community/react-native-svg'
s.authors = 'Horcrux Chen'
- s.source = { :git => 'https://github.com/magicismight/react-native-svg.git', :tag => s.version }
+ s.source = { :git => 'https://github.com/react-native-community/react-native-svg.git', :tag => s.version }
s.source_files = 'ios/**/*.{h,m}'
s.requires_arc = true
s.platforms = { :ios => "8.0", :tvos => "9.2" }
diff --git a/lib/extract/extractResponder.js b/lib/extract/extractResponder.js
index a5bf29c5..bbed334f 100644
--- a/lib/extract/extractResponder.js
+++ b/lib/extract/extractResponder.js
@@ -16,6 +16,15 @@ const touchableProps = [
"delayLongPress",
];
+function hasTouchableProperty(props) {
+ for (let prop of touchableProps) {
+ if (props.hasOwnProperty(prop)) {
+ return true;
+ }
+ }
+ return false;
+}
+
export default function(props, ref) {
const extractedProps = {};
@@ -30,7 +39,7 @@ export default function(props, ref) {
}
}
- if (touchableProps.some(key => props[key])) {
+ if (hasTouchableProperty(props)) {
extractedProps.responsible = true;
Object.assign(extractedProps, {
onStartShouldSetResponder:
diff --git a/lib/extract/extractText.js b/lib/extract/extractText.js
index 79eb2480..b2af6dee 100644
--- a/lib/extract/extractText.js
+++ b/lib/extract/extractText.js
@@ -93,6 +93,19 @@ export function extractFont(prop) {
return { ...font, ...ownedFont };
}
+function getChildren(children, TSpan) {
+ const reactChildren = Children.toArray(children);
+ const result = [];
+ for (let child of reactChildren) {
+ if (typeof child === "string" || typeof child === "number") {
+ result.push({child.toString()});
+ } else {
+ result.push(child);
+ }
+ }
+ return result;
+}
+
export default function(props, container = false, TSpan) {
const {
x,
@@ -116,13 +129,7 @@ export default function(props, container = false, TSpan) {
children = null;
}
} else if (Children.count(children) > 1 || Array.isArray(children)) {
- children = Children.map(children, child => {
- if (typeof child === "string" || typeof child === "number") {
- return {child.toString()};
- } else {
- return child;
- }
- });
+ children = getChildren(children, TSpan);
}
return {