Skip to content

Commit

Permalink
fix: projection null
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Aug 9, 2023
1 parent ba619cc commit fb63b98
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"test:unit": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/unit/ --coverage -i --logHeapUsage",
"test:integration": "node --expose-gc --max-old-space-size=4096 --unhandled-rejections=strict node_modules/jest/bin/jest __tests__/integration/ --coverage -i --logHeapUsage",
"test:treeshaking": "vite build -c ./__tests__/treeshaking/vite.config.js",
"test-live": "cross-env DEBUG_MODE=1 jest --watch",
"build:umd": "rimraf ./dist && rollup -c && npm run size",
"build:cjs": "rimraf ./lib && tsc --module commonjs --outDir lib",
"build:esm": "rimraf ./esm && tsc --module ESNext --outDir esm",
Expand Down
2 changes: 1 addition & 1 deletion src/geo/geoView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const GeoView: CC<GeoViewOptions> = () => {
});
const normalize = (point) => {
const visualPoint = visual(point);
if (!visualPoint) return null;
if (!visualPoint) return [null, null];
const [vx, vy] = visualPoint;
return [scaleX.map(vx), scaleY.map(vy)];
};
Expand Down
14 changes: 11 additions & 3 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import { defineConfig } from 'vite';
import { deepMix } from '@antv/util';

const { LINK, MODULE } = process.env;

if (LINK === '1' && !MODULE) {
throw new Error(
`Please specify MODULE, for example: $ MODULE=@antv/gui npm run dev:link.`,
);
}

const linkOptions =
process.env.LINK === '1'
LINK === '1'
? {
server: {
watch: {
ignored: ['!**/node_modules/@antv/gui/**'],
ignored: [`!**/node_modules/${MODULE}/**`],
},
},
optimizeDeps: {
exclude: ['@antv/gui'],
exclude: [`${MODULE}`],
},
}
: {};
Expand Down

0 comments on commit fb63b98

Please sign in to comment.