File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { render } from 'react-dom' ;
3
- import AceEditor from 'react- ace' ;
3
+ import AceEditor from '../src/ ace.jsx ' ;
4
4
import brace from 'brace' ;
5
5
6
6
import 'brace/mode/java' ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ var path = require('path');
2
2
var webpack = require ( 'webpack' ) ;
3
3
4
4
module . exports = {
5
- devtool : 'cheap-module-eval- source-map' ,
5
+ devtool : 'source-map' ,
6
6
entry : [
7
7
'webpack-hot-middleware/client' ,
8
8
'./index'
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-ace" ,
3
- "version" : " 4.2.1 " ,
3
+ "version" : " 4.2.2 " ,
4
4
"description" : " A react component for Ace Editor" ,
5
5
"main" : " lib/ace.js" ,
6
6
"types" : " types.d.ts" ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export default class ReactAce extends Component {
85
85
this . handleOptions ( this . props ) ;
86
86
this . editor . getSession ( ) . setAnnotations ( annotations || [ ] ) ;
87
87
if ( markers && markers . length > 0 ) {
88
- this . handleMarkers ( markers ) ;
88
+ this . handleMarkers ( markers ) ;
89
89
}
90
90
91
91
// get a list of possible options to avoid 'misspelled option errors'
@@ -172,8 +172,8 @@ export default class ReactAce extends Component {
172
172
if ( ! isEqual ( nextProps . annotations , oldProps . annotations ) ) {
173
173
this . editor . getSession ( ) . setAnnotations ( nextProps . annotations || [ ] ) ;
174
174
}
175
- if ( ! isEqual ( nextProps . markers , oldProps . markers ) ) {
176
- this . handleMarkers ( nextProps . markers || [ ] ) ;
175
+ if ( ! isEqual ( nextProps . markers , oldProps . markers ) && ( nextProps . markers && nextProps . markers . length > 0 ) ) {
176
+ this . handleMarkers ( markers ) ;
177
177
}
178
178
if ( ! isEqual ( nextProps . scrollMargins , oldProps . scrollMargins ) ) {
179
179
this . handleScrollMargins ( nextProps . scrollMargins )
You can’t perform that action at this time.
0 commit comments