vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
850 stars 334 forks source link

Strict mode does not allow function declarations in a lexically nested statement. #151

Closed cjahv closed 3 years ago

cjahv commented 5 years ago

https://github.com/vault-development/react-native-svg-uri/blob/master/index.js#L152

  // Remove empty strings from children array
  trimElementChilden(children) {
    for (child of children) {
      if (typeof child === 'string') { 
        if (child.trim().length === 0) 
          children.splice(children.indexOf(child), 1);
      }
    }
  }

child should have a statement