Skip to content

Commit 56830a3

Browse files
committed
chore
1 parent 5b18e9f commit 56830a3

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

llrt_core/src/modules/console.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,12 @@ pub fn init(ctx: &Ctx<'_>) -> Result<()> {
372372
console.set("log", Func::from(log))?;
373373
console.set("trace", Func::from(log_trace))?;
374374
console.set("warn", Func::from(log_warn))?;
375-
376375
console.prop(
377376
PredefinedAtom::SymbolToStringTag,
378377
Property::from("console").configurable(),
379378
)?;
380-
globals.prop(
381-
"console",
382-
Property::from(console.clone()).writable().configurable(),
383-
)?;
379+
380+
globals.prop("console", Property::from(console).writable().configurable())?;
384381

385382
Ok(())
386383
}

modules/llrt_console/src/lib.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,12 @@ pub fn init(ctx: &Ctx<'_>) -> Result<()> {
157157
console.set("log", Func::from(log))?;
158158
console.set("trace", Func::from(log_trace))?;
159159
console.set("warn", Func::from(log_warn))?;
160-
161160
console.prop(
162161
PredefinedAtom::SymbolToStringTag,
163162
Property::from("console").configurable(),
164163
)?;
165-
globals.prop(
166-
"console",
167-
Property::from(console.clone()).writable().configurable(),
168-
)?;
164+
165+
globals.prop("console", Property::from(console).writable().configurable())?;
169166

170167
Ok(())
171168
}

0 commit comments

Comments
 (0)