Skip to content

Commit 54341da

Browse files
authored
fix(nanoflow-actions-native): GetStraightLineDistance runtime errors - 11.6 (#689)
2 parents 4876dd2 + fdb45ca commit 54341da

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ export function bigJsImportReplacer() {
55
const [filename] = Object.keys(bundle);
66
const fileInfo = bundle[filename];
77

8-
// Remove Big import entirely - mxbuild will add it in the header at line 8
9-
fileInfo.code = fileInfo.code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?\s*\r?\n/m, "");
8+
// Keep the Big import (Studio Pro does not re-add it at runtime), normalized to Studio Pro's quote style
9+
fileInfo.code = fileInfo.code.replace(
10+
/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?/m,
11+
`import { Big } from "big.js";`
12+
);
1013
}
1114
};
1215
}

‎packages/jsActions/mobile-resources-native/CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime.
12+
913
## [11.3.14] Native Mobile Resources - 2026-10-8
1014

1115
## [2.1.1] Gallery

‎packages/jsActions/nanoflow-actions-native/CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Fixed an issue where the "Get straight line distance" action threw an error at runtime.
12+
- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime.
13+
914
## [6.2.3] Nanoflow Commons - 2026-9-2
1015

1116
### Fixed

‎packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { Big } from "big.js";
99

1010
// BEGIN EXTRA CODE
1111

12-
type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE";
13-
1412
function deg2rad(deg: Big): Big {
1513
return deg.times(Math.PI / 180);
1614
}
@@ -23,6 +21,8 @@ function kmToNauticalMile(km: Big): Big {
2321
return km.div(1.852);
2422
}
2523

24+
type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE";
25+
2626
// END EXTRA CODE
2727

2828
/**

0 commit comments

Comments
 (0)