Skip to content

Commit b975000

Browse files
committedJun 30, 2017
remove useless check
1 parent c3ae528 commit b975000

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎lib/Codemirror.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var CodeMirror = createReactClass({
6565
}
6666
},
6767
componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
68-
if (this.codeMirror && nextProps.value !== undefined && nextProps.value !== this.props.value && normalizeLineEndings(this.codeMirror.getValue()) !== normalizeLineEndings(nextProps.value)) {
68+
if (this.codeMirror && nextProps.value !== undefined && normalizeLineEndings(this.codeMirror.getValue()) !== normalizeLineEndings(nextProps.value)) {
6969
if (this.props.preserveScrollPosition) {
7070
var prevScrollPosition = this.codeMirror.getScrollInfo();
7171
this.codeMirror.setValue(nextProps.value);
@@ -133,4 +133,4 @@ var CodeMirror = createReactClass({
133133
}
134134
});
135135

136-
module.exports = CodeMirror;
136+
module.exports = CodeMirror;

‎src/Codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const CodeMirror = createReactClass({
6363
}
6464
},
6565
componentWillReceiveProps: function (nextProps) {
66-
if (this.codeMirror && nextProps.value !== undefined && nextProps.value !== this.props.value && normalizeLineEndings(this.codeMirror.getValue()) !== normalizeLineEndings(nextProps.value)) {
66+
if (this.codeMirror && nextProps.value !== undefined && normalizeLineEndings(this.codeMirror.getValue()) !== normalizeLineEndings(nextProps.value)) {
6767
if (this.props.preserveScrollPosition) {
6868
var prevScrollPosition = this.codeMirror.getScrollInfo();
6969
this.codeMirror.setValue(nextProps.value);

0 commit comments

Comments
 (0)
Please sign in to comment.