Skip to content

Commit 8d41c08

Browse files
committed
Fix React "unknown prop container" warning
1 parent c051eb9 commit 8d41c08

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-swf",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"license": "MIT",
55
"description": "Shockwave Flash Player component for React",
66
"authors": ["Andreas Svensson <[email protected]>"],

npm-react-swf/compat.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! react-swf v1.0.3 | @syranide | MIT license */
1+
/*! react-swf v1.0.4 | @syranide | MIT license */
22

33
'use strict';
44

@@ -29,12 +29,12 @@ ReactSWFCompat.propTypes = {
2929
};
3030

3131
ReactSWFCompat.prototype._createSWFElement = function() {
32-
var swfProps = Object.assign({}, this.props);
33-
swfProps.container = undefined;
34-
swfProps.movie = swfProps.src;
35-
swfProps.ref = this._swfRefCallback;
32+
var props = Object.assign({}, this.props);
33+
delete props.container;
34+
props.movie = props.src;
35+
props.ref = this._swfRefCallback;
3636

37-
return React.createElement(ReactSWF, swfProps);
37+
return React.createElement(ReactSWF, props);
3838
};
3939

4040
ReactSWFCompat.prototype.getFPDOMNode = function() {

npm-react-swf/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-swf",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"license": "MIT",
55
"description": "Shockwave Flash Player component for React",
66
"author": "Andreas Svensson <[email protected]>",

npm-react-swf/react-swf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! react-swf v1.0.3 | @syranide | MIT license */
1+
/*! react-swf v1.0.4 | @syranide | MIT license */
22

33
'use strict';
44

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-swf",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"license": "MIT",
55
"description": "Shockwave Flash Player component for React",
66
"author": "Andreas Svensson <[email protected]>",

react-swf-compat.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! react-swf v1.0.3 | @syranide | MIT license */
1+
/*! react-swf v1.0.4 | @syranide | MIT license */
22

33
(function(root, factory) {
44
if (typeof define === 'function' && define.amd) {
@@ -34,12 +34,12 @@
3434
};
3535

3636
ReactSWFCompat.prototype._createSWFElement = function() {
37-
var swfProps = Object.assign({}, this.props);
38-
swfProps.container = undefined;
39-
swfProps.movie = swfProps.src;
40-
swfProps.ref = this._swfRefCallback;
37+
var props = Object.assign({}, this.props);
38+
delete props.container;
39+
props.movie = props.src;
40+
props.ref = this._swfRefCallback;
4141

42-
return React.createElement(ReactSWF, swfProps);
42+
return React.createElement(ReactSWF, props);
4343
};
4444

4545
ReactSWFCompat.prototype.getFPDOMNode = function() {

react-swf-compat.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-swf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! react-swf v1.0.3 | @syranide | MIT license */
1+
/*! react-swf v1.0.4 | @syranide | MIT license */
22

33
(function(root, factory) {
44
if (typeof define === 'function' && define.amd) {

react-swf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)