Skip to content

Commit f67f831

Browse files
committed
Merge pull request christianalfoni#252 from neoziro/patch-2
Prevent multiple rendering with PureRenderMixin
2 parents 59bde83 + 6bcdb61 commit f67f831

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ var Mixin = require('./Mixin.js');
77
var HOC = require('./HOC.js');
88
var Decorator = require('./Decorator.js');
99
var options = {};
10+
var emptyArray = [];
1011

1112
Formsy.Mixin = Mixin;
1213
Formsy.HOC = HOC;
@@ -277,7 +278,7 @@ Formsy.Form = React.createClass({
277278
error: (function () {
278279

279280
if (isValid && !isRequired) {
280-
return [];
281+
return emptyArray;
281282
}
282283

283284
if (validationResults.errors.length) {

0 commit comments

Comments
 (0)