react-inlinesvg
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -217,3 +217,11 @@ var InlineSVGError, PropTypes, React, Status, configurationError, createError, delay, getHash, http, httpplease, ieXDomain, isSupportedEnvironment, me, once, span, supportsInlineSVG, uniquifyIDs, unsupportedBrowserError, | ||
load: function() { | ||
return http.get(this.props.src, this.handleLoad); | ||
var m, text; | ||
if (m = this.props.src.match(/data:image\/svg[^,]*?(;base64)?,(.*)/)) { | ||
text = m[1] ? atob(m[2]) : decodeURIComponent(m[2]); | ||
return this.handleLoad(null, { | ||
text: text | ||
}); | ||
} else { | ||
return http.get(this.props.src, this.handleLoad); | ||
} | ||
}, | ||
@@ -220,0 +228,0 @@ getClassName: function() { |
{ | ||
"name": "react-inlinesvg", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "An SVG loader for React", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15035
239