diff --git a/js/bundle.go b/js/bundle.go index b13adc26639..d80ec7a2b27 100644 --- a/js/bundle.go +++ b/js/bundle.go @@ -296,13 +296,6 @@ func (b *Bundle) Instantiate( return bi, instErr } -// IsExecutable returns whether the given name is an exported and -// executable function in the script. -func (b *Bundle) IsExecutable(name string) bool { - _, exists := b.exports[name] - return exists -} - // Instantiates the bundle into an existing runtime. Not public because it also messes with a bunch // of other things, will potentially thrash data and makes a mess in it if the operation fails. func (b *Bundle) instantiate(logger logrus.FieldLogger, rt *goja.Runtime, init *InitContext, vuID uint64) error { diff --git a/js/runner.go b/js/runner.go index a0a4caefa2e..80aad46cd5f 100644 --- a/js/runner.go +++ b/js/runner.go @@ -347,10 +347,9 @@ func (r *Runner) GetOptions() lib.Options { // IsExecutable returns whether the given name is an exported and // executable function in the script. -// -// TODO: completely remove this? func (r *Runner) IsExecutable(name string) bool { - return r.Bundle.IsExecutable(name) + _, exists := r.Bundle.exports[name] + return exists } // HandleSummary calls the specified summary callback, if supplied.