# Enable Optional Chaining

**URL:** <https://community.fibery.io/t/enable-optional-chaining/8606>\
**Category:** Bugs & Issues\
**Created:** [April 13, 2025, 1:51pm UTC](https://community.fibery.io/t/enable-optional-chaining/8606 "2025-04-13T13:51:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_BC](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/yuri_bc/32/8803_2.png) [@Yuri\_BC](https://community.fibery.io/u/Yuri_BC)\
**Post date:** [April 13, 2025, 1:51pm UTC](https://community.fibery.io/t/enable-optional-chaining/8606/1 "2025-04-13T13:51:25Z")

</div>

When I ask AI to write a script to use in a fibery automation, it ALWAYS, like 100% of the cases, uses OptionalChaining, and then I have to explain not to use that.

Please:

**Options to Enable Optional Chaining:**

1. **Upgrade JavaScript version** to **ES2020** or higher (this enables native support for optional chaining).
2. **Configure Babel** with the plugin `@babel/plugin-proposal-optional-chaining` (if using Babel to transpile the code).
3. **Upgrade TypeScript** to target **ES2020** or higher (in `tsconfig.json`) to enable optional chaining.
4. **Use a polyfill** (if targeting older environments that do not support optional chaining natively).

---

<div class="post-metadata">

**Author:** ![Sergey\_Truhtanov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/sergey_truhtanov/32/13986_2.png) [@Sergey\_Truhtanov](https://community.fibery.io/u/Sergey_Truhtanov)\
**Post date:** [April 14, 2025, 9:03am UTC](https://community.fibery.io/t/enable-optional-chaining/8606/2 "2025-04-14T09:03:43Z")

</div>

Hello.  
We got same issue ourselves, that’s why some time ago I worked on upgrading Script Engine to Nodejs22.

I’ve released it to production just now. Editor on UI is not yet familiar with some recent Nodejs apis (like Array.flatMap for example), so you may see them underlined with red. But it should work okay.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [April 29, 2025, 11:27am UTC](https://community.fibery.io/t/enable-optional-chaining/8606/3 "2025-04-29T11:27:28Z")

</div>


