Skip to content

Commit 937d9cc

Browse files
Fix SSR check on Node.js v22
1 parent b4039e4 commit 937d9cc

File tree

7 files changed

+18533
-12806
lines changed

7 files changed

+18533
-12806
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ on: [push, pull_request]
33
jobs:
44
build:
55
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
node-version: ['20.x', '22.x']
69
steps:
710
- name: Checkout repository
811
uses: actions/checkout@v4
9-
- name: Use Node.js
12+
- name: Use Node.js ${{ matrix.node-version }}
1013
uses: actions/setup-node@v4
1114
with:
12-
node-version: '20.x'
15+
node-version: ${{ matrix.node-version }}
1316
cache: 'npm'
1417
- name: NPM install
1518
run: npm install
1619
- name: Verify build works
1720
run: npm run build
1821
- name: Jest
1922
run: npm run test
20-

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ require('codemirror/mode/javascript/javascript');
168168

169169
- Is server side rendering supported?
170170

171-
Yes. react-codemirror2 will prevent rendering in absence of `navigator`. You can also force the component to not render via a `PREVENT_CODEMIRROR_RENDER` global.
171+
Yes. react-codemirror2 will prevent rendering in absence of `window`. You can also force the component to not render via a `PREVENT_CODEMIRROR_RENDER` global.
172172

173173
- How can I get the instance?
174174

0 commit comments

Comments
 (0)