File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/components/react-web-terminal Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-web-terminal" ,
3
- "version" : " 0.2.4 " ,
3
+ "version" : " 0.2.5 " ,
4
4
"description" : " A web-based terminal facade built on reactjs" ,
5
5
"repository" : {
6
6
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default class WebTerminal extends React.Component {
14
14
this . state = {
15
15
log : [ ] ,
16
16
logId : 0 ,
17
- commandHandler : props . commandHandler ? props . commandHandler : ( component ) => { component . output ( component . input ( ) ) } ,
17
+ commandHandler : props . commandHandler ? props . commandHandler : component => component . output ( component . input ( ) ) ,
18
18
keyStrokeMap : props . keyStrokeMap || { } ,
19
19
style : {
20
20
reactWebTerminal : { } ,
@@ -46,8 +46,6 @@ export default class WebTerminal extends React.Component {
46
46
}
47
47
48
48
output ( output ) {
49
- this . addToLog ( this . inputComp . state . prompt + this . input ( ) , 'react-web-terminal-input' ) ;
50
-
51
49
this . addToLog ( output , 'react-web-terminal-output' ) ;
52
50
53
51
this . resetInputBuffer ( ) ;
@@ -68,6 +66,7 @@ export default class WebTerminal extends React.Component {
68
66
}
69
67
70
68
onCommandEntered ( ) {
69
+ this . addToLog ( this . inputComp . state . prompt + this . input ( ) , 'react-web-terminal-input' ) ;
71
70
this . state . commandHandler ( this ) ;
72
71
}
73
72
You can’t perform that action at this time.
0 commit comments