Skip to content

Commit

Permalink
Fix React "unknown prop container" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
syranide committed Jul 14, 2016
1 parent c051eb9 commit 8d41c08
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-swf",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"description": "Shockwave Flash Player component for React",
"authors": ["Andreas Svensson <andreas@syranide.com>"],
Expand Down
12 changes: 6 additions & 6 deletions npm-react-swf/compat.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! react-swf v1.0.3 | @syranide | MIT license */
/*! react-swf v1.0.4 | @syranide | MIT license */

'use strict';

Expand Down Expand Up @@ -29,12 +29,12 @@ ReactSWFCompat.propTypes = {
};

ReactSWFCompat.prototype._createSWFElement = function() {
var swfProps = Object.assign({}, this.props);
swfProps.container = undefined;
swfProps.movie = swfProps.src;
swfProps.ref = this._swfRefCallback;
var props = Object.assign({}, this.props);
delete props.container;
props.movie = props.src;
props.ref = this._swfRefCallback;

return React.createElement(ReactSWF, swfProps);
return React.createElement(ReactSWF, props);
};

ReactSWFCompat.prototype.getFPDOMNode = function() {
Expand Down
2 changes: 1 addition & 1 deletion npm-react-swf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-swf",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"description": "Shockwave Flash Player component for React",
"author": "Andreas Svensson <andreas@syranide.com>",
Expand Down
2 changes: 1 addition & 1 deletion npm-react-swf/react-swf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! react-swf v1.0.3 | @syranide | MIT license */
/*! react-swf v1.0.4 | @syranide | MIT license */

'use strict';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-swf",
"version": "1.0.3",
"version": "1.0.4",
"license": "MIT",
"description": "Shockwave Flash Player component for React",
"author": "Andreas Svensson <andreas@syranide.com>",
Expand Down
12 changes: 6 additions & 6 deletions react-swf-compat.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! react-swf v1.0.3 | @syranide | MIT license */
/*! react-swf v1.0.4 | @syranide | MIT license */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
Expand Down Expand Up @@ -34,12 +34,12 @@
};

ReactSWFCompat.prototype._createSWFElement = function() {
var swfProps = Object.assign({}, this.props);
swfProps.container = undefined;
swfProps.movie = swfProps.src;
swfProps.ref = this._swfRefCallback;
var props = Object.assign({}, this.props);
delete props.container;
props.movie = props.src;
props.ref = this._swfRefCallback;

return React.createElement(ReactSWF, swfProps);
return React.createElement(ReactSWF, props);
};

ReactSWFCompat.prototype.getFPDOMNode = function() {
Expand Down
4 changes: 2 additions & 2 deletions react-swf-compat.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion react-swf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! react-swf v1.0.3 | @syranide | MIT license */
/*! react-swf v1.0.4 | @syranide | MIT license */

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion react-swf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8d41c08

Please sign in to comment.