We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 097a7ca commit 1869102Copy full SHA for 1869102
src/bsconfig.rs
@@ -245,7 +245,17 @@ pub fn read(path: String) -> Config {
245
}
246
247
fn check_if_rescript11_or_higher(version: &str) -> bool {
248
- version.split('.').next().unwrap().parse::<usize>().unwrap() >= 11
+ // Non stable rescript versions might contain non-numeric characters
249
+ let filter_non_number_chars = |s: &str| s.chars().filter(|c| c.is_numeric()).collect::<String>();
250
+
251
+ version
252
+ .split('.')
253
+ .next()
254
+ .map(filter_non_number_chars)
255
+ .unwrap()
256
+ .parse::<usize>()
257
258
+ >= 11
259
260
261
fn namespace_from_package_name(package_name: &str) -> String {
0 commit comments