Skip to content

Check if msg.content is array before accessing first element to avoid… #5308

Check if msg.content is array before accessing first element to avoid…

Check if msg.content is array before accessing first element to avoid… #5308

Workflow file for this run

# .github/workflows/chromatic.yml
name: "Chromatic"
on: push
jobs:
chromatic:
runs-on: ubuntu-latest
env:
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Cache node_modules
id: node-modules-cache
uses: actions/cache@v4.2.3
with:
path: node_modules
key: node-modules-cache-${{ hashFiles('package-lock.json', '.npmrc') }}
save-always: true
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: npm ci --prefer-offline
- name: Run Chromatic
if: env.CHROMATIC_PROJECT_TOKEN
uses: chromaui/action@v13.1.2
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
onlyChanged: true # 👈 Required option to enable TurboSnap
storybookBaseDir: ./packages/ui-components