diplodoc-platform / diplodoc-platform/transform

Transform crashes with `{% else %}`

Open
#815 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
69
Forks
59
Avg merge
1d 21h
Merged PRs (30d)
6

Description

### Package version

latest

### Node version

_No response_

### Platform

browser

### What steps will reproduce the bug?

1. go to https://diplodoc-platform.github.io/
2. write \`{% else %}\`
3. see errors in console

### What is the expected behavior?

No crash

### What do you see instead?

hook.js:608 TypeError: Cannot read properties of undefined (reading 'openCondition')
at conditions (index.js:sourcemap:57500:40)
at liquidSnippet (index.js:sourcemap:57603:45)
at liquidDocument (index.js:sourcemap:57633:40)
at applyLiquid (index.js:sourcemap:103058:75)
at transform3 (index.js:sourcemap:103071:23)
at generateHTML (index.js:sourcemap:175087:43)
at index.js:sourcemap:175129:24
at index.js:sourcemap:175150:7
at commitHookEffectListMount (index.js:sourcemap:21072:37)
at commitPassiveMountOnFiber (index.js:sourcemap:22320:21) Error Component Stack
at SplitViewEditor (index.js:sourcemap:175118:60)
at div ()
at div ()
at Playground (index.js:sourcemap:336070:35)
at page ()
at ConstructorItem (index.js:sourcemap:186098:34)
at div ()
at index.js:sourcemap:181721:23
at BlockBase (index.js:sourcemap:181932:13)
at BlockDecoration (index.js:sourcemap:186091:21)
at ConstructorBlock (index.js:sourcemap:186800:36)
at ConstructorBlocks (index.js:sourcemap:186901:30)
at div ()
at index.js:sourcemap:181721:23
at div ()
at index.js:sourcemap:181732:24
at ConstructorRow (index.js:sourcemap:186942:37)
at div ()
at div ()
at Grid (index.js:sourcemap:181746:24)
at main ()
at div ()
at Layout2 (index.js:sourcemap:186778:30)
at div ()
at div ()
at RootCn (index.js:sourcemap:184699:30)
at Constructor (index.js:sourcemap:186951:22)
at PageConstructor (index.js:sourcemap:187000:22)
at PageConstructorProvider (index.js:sourcemap:187014:23)
at App2 (index.js:sourcemap:336040:61)
at ThemeProvider (index.js:sourcemap:153319:35)

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.