Skip to content

Commit

Permalink
fix: fix <lazyframe>$collect() on webR
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Jan 8, 2025
1 parent cccb6fc commit 1160e30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rust/src/lazyframe/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ impl PlRLazyFrame {
}

let ldf = self.ldf.clone();

#[cfg(not(target_arch = "wasm32"))]
let df = if ThreadCom::try_from_global(&CONFIG).is_ok() {
ldf.collect().map_err(RPolarsErr::from)?
} else {
Expand All @@ -131,6 +133,9 @@ impl PlRLazyFrame {
.map_err(RPolarsErr::from)?
};

#[cfg(target_arch = "wasm32")]
let df = ldf.collect().map_err(RPolarsErr::from)?;

Ok(df.into())
}

Expand Down

0 comments on commit 1160e30

Please sign in to comment.