diff --git a/cloudflare/dostub.go b/cloudflare/dostub.go index 2444c2b..7200050 100644 --- a/cloudflare/dostub.go +++ b/cloudflare/dostub.go @@ -6,6 +6,7 @@ import ( "net/http" "syscall/js" + "github.com/syumai/workers/cloudflare/internal/cfruntimecontext" "github.com/syumai/workers/internal/jshttp" "github.com/syumai/workers/internal/jsutil" ) @@ -20,7 +21,7 @@ type DurableObjectNamespace struct { // This binding must be defined in the `wrangler.toml` file. The method will // return an `error` when there is no binding defined by `varName`. func NewDurableObjectNamespace(ctx context.Context, varName string) (*DurableObjectNamespace, error) { - inst := getRuntimeContextEnv(ctx).Get(varName) + inst := cfruntimecontext.GetRuntimeContextEnv(ctx).Get(varName) if inst.IsUndefined() { return nil, fmt.Errorf("%s is undefined", varName) }