diff --git a/.github/workflows/lint-test-build.yml b/.github/workflows/lint-test-build.yml index d573a4ee59..214dc9e30c 100644 --- a/.github/workflows/lint-test-build.yml +++ b/.github/workflows/lint-test-build.yml @@ -24,7 +24,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} run: | - if [[ $NODE_VERSION == '18' ]]; then + if (( $NODE_VERSION >= 18 )); then NODE_OPTIONS=--openssl-legacy-provider npm install -g yarn else npm install -g yarn @@ -34,7 +34,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} run: | - if [[ $NODE_VERSION == '18' ]]; then + if (( $NODE_VERSION >= 18 )); then NODE_OPTIONS=--openssl-legacy-provider yarn install else yarn install @@ -45,7 +45,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} run: | - if [[ $NODE_VERSION == '18' ]]; then + if (( $NODE_VERSION >= 18 )); then NODE_OPTIONS=--openssl-legacy-provider yarn lint else yarn lint @@ -55,7 +55,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} run: | - if [[ $NODE_VERSION == '18' ]]; then + if (( $NODE_VERSION >= 18 )); then NODE_OPTIONS=--openssl-legacy-provider yarn test else yarn test @@ -65,7 +65,7 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} run: | - if [[ $NODE_VERSION == '18' ]]; then + if (( $NODE_VERSION >= 18 )); then NODE_OPTIONS=--openssl-legacy-provider yarn build else yarn build diff --git a/docs/package.json b/docs/package.json index 801273767f..5b23afbe3a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -8,7 +8,7 @@ "test": "test" }, "engines": { - "node": "16.x || 18.x", + "node": "16.x || 18.x || 20.x", "npm": "8.x", "yarn": "1.x" }, diff --git a/packages/sage-assets/package.json b/packages/sage-assets/package.json index 63e8491d81..f2b20303c8 100644 --- a/packages/sage-assets/package.json +++ b/packages/sage-assets/package.json @@ -17,7 +17,7 @@ "sassdoc/*" ], "engines": { - "node": "16.x || 18.x", + "node": "16.x || 18.x || 20.x", "npm": "8.x", "yarn": "1.x" }, diff --git a/packages/sage-packs/package.json b/packages/sage-packs/package.json index 0fe0bd2575..57c6a3fbcf 100644 --- a/packages/sage-packs/package.json +++ b/packages/sage-packs/package.json @@ -7,7 +7,7 @@ "packs" ], "engines": { - "node": "16.x || 18.x", + "node": "16.x || 18.x || 20.x", "npm": "8.x", "yarn": "1.x" }, diff --git a/packages/sage-react/lib/Dropdown/Dropdown.jsx b/packages/sage-react/lib/Dropdown/Dropdown.jsx index efbfc34746..07883a7c05 100644 --- a/packages/sage-react/lib/Dropdown/Dropdown.jsx +++ b/packages/sage-react/lib/Dropdown/Dropdown.jsx @@ -80,6 +80,10 @@ export const Dropdown = ({ let directionX = null; let directionY = null; const el = wrapperRef.current; + + // if el is null, return + if (!el) return; + // Elements const button = el; const panel = el.lastElementChild; diff --git a/packages/sage-react/package.json b/packages/sage-react/package.json index 581b608f01..ce95707da6 100644 --- a/packages/sage-react/package.json +++ b/packages/sage-react/package.json @@ -28,7 +28,7 @@ "url": "https://github.com/Kajabi/sage-lib/issues" }, "engines": { - "node": "16.x || 18.x", + "node": "16.x || 18.x || 20.x", "npm": "8.x", "yarn": "1.x" }, diff --git a/packages/sage-system/package.json b/packages/sage-system/package.json index 02b9da19fb..4f3b070307 100644 --- a/packages/sage-system/package.json +++ b/packages/sage-system/package.json @@ -17,7 +17,7 @@ "dist/*" ], "engines": { - "node": "16.x || 18.x", + "node": "16.x || 18.x || 20.x", "npm": "8.x", "yarn": "1.x" }, diff --git a/yarn.lock b/yarn.lock index 934b204bec..5d0bed8114 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6198,9 +6198,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001370: - version "1.0.30001521" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz" - integrity sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ== + version "1.0.30001618" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001618.tgz" + integrity sha512-p407+D1tIkDvsEAPS22lJxLQQaG8OTBEqo0KhzfABGk0TU4juBNDSfH0hyAp/HRyx+M8L17z/ltyhxh27FTfQg== capital-case@^1.0.4: version "1.0.4"