Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Don’t cue off of env.preload since it has already be accounted for in…
Browse files Browse the repository at this point in the history
… env.repl.
  • Loading branch information
jdalton committed Oct 25, 2017
1 parent 00860cc commit d2cd040
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/hook/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import captureStackTrace from "../error/capture-stack-trace.js"
import compiler from "../caching-compiler.js"
import createOptions from "../util/create-options.js"
import encodeId from "../util/encode-id.js"
import env from "../env.js"
import getCacheFileName from "../util/get-cache-file-name.js"
import isObject from "../util/is-object.js"
import maskStackTrace from "../error/mask-stack-trace.js"
Expand Down Expand Up @@ -95,9 +94,7 @@ function hook(vm) {

const { createContext } = REPLServer.prototype

if (env.preload &&
process.argv.length < 2 &&
typeof createContext === "function") {
if (typeof createContext === "function") {
REPLServer.prototype.createContext = function () {
REPLServer.prototype.createContext = createContext
const context = createContext.call(this)
Expand Down

0 comments on commit d2cd040

Please sign in to comment.