mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
4bd44c11a5
The `.load` command would fail with any file that contains multiline `.` operator expressions. This was particularly noticeable when chaining promises or multi-line arrow expressions. This change Forces the REPL to be in `editorMode` while loading a file from disk using the `.load` command. Fixes: https://github.com/nodejs/node/issues/14022 PR-URL: https://github.com/nodejs/node/pull/14861 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Refael Ackermann <refack@gmail.com>
7 lines
155 B
JavaScript
7 lines
155 B
JavaScript
const getLunch = () =>
|
|
placeOrder('tacos')
|
|
.then(eat);
|
|
|
|
const placeOrder = (order) => Promise.resolve(order);
|
|
const eat = (food) => '<nom nom nom>';
|