From 028c673f1dfdfd1a30afd17578b9e534d9068ec0 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 24 May 2024 12:46:58 +0200 Subject: [PATCH] Update mod.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Donny/강동윤 --- crates/turbopack-ecmascript/src/transform/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/turbopack-ecmascript/src/transform/mod.rs b/crates/turbopack-ecmascript/src/transform/mod.rs index 75b8dcc85d251..b7383e529d565 100644 --- a/crates/turbopack-ecmascript/src/transform/mod.rs +++ b/crates/turbopack-ecmascript/src/transform/mod.rs @@ -141,8 +141,7 @@ impl EcmascriptInputTransform { match self { EcmascriptInputTransform::GlobalTypeofs { window_value } => { let mut typeofs: AHashMap = Default::default(); - let val = window_value.to_owned(); - typeofs.insert("window".into(), JsWord::from(val)); + typeofs.insert("window".into(), JsWord::from(&**window_value)); program.visit_mut_with(&mut inline_globals2( Default::default(),