Skip to content

Commit 46cdb6d

Browse files
committed
Revert to using return()
1 parent 74b877a commit 46cdb6d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/react-console.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,12 @@ export default class extends React.Component<ConsoleProps,ConsoleState> {
189189
log: log,
190190
}, this.scrollIfBottom() );
191191
}
192-
done = () => {
192+
return = () => {
193193
this.setState({
194194
acceptInput: true,
195195
currLabel: this.nextLabel(),
196196
}, this.scrollIfBottom() );
197197
}
198-
return = () => {
199-
console.log("WARNING: return() is deprecated. Use done() or the callback (2nd arg of handler) instead.");
200-
this.done();
201-
}
202198
// Component Lifecycle
203199
componentDidMount() {
204200
if(this.props.autofocus) {
@@ -534,7 +530,7 @@ export default class extends React.Component<ConsoleProps,ConsoleState> {
534530
if(this.props.handler) {
535531
this.props.handler(command)
536532
} else {
537-
this.done();
533+
this.return();
538534
}
539535
});
540536
}

0 commit comments

Comments
 (0)