GavinJoyce / ember-headlessui

https://gavinjoyce.github.io/ember-headlessui/
Other
92 stars 34 forks source link

Transitions are throwing errors in Fastboot #133

Open roomman opened 2 years ago

roomman commented 2 years ago

I'm seeing the following error from a Fastboot server:

There was an error running your app in fastboot. More info about the error: 
 ReferenceError: getComputedStyle is not defined
    at waitForTransition (webpack://solomon-website/./node_modules/ember-headlessui/utils/transition.js?:42:7)
    at AppliedClassNamesManager.setTransitionClassesTask (webpack://solomon-website/./node_modules/ember-headlessui/helpers/transition/applied-class-names.js?:122:79)
    at setTransitionClassesTask.next (<anonymous>)
    at GeneratorState.step (webpack://solomon-website/./node_modules/ember-concurrency/-private/external/generator-state.js?:27:35)
    at TaskInstanceExecutor.generatorStep (webpack://solomon-website/./node_modules/ember-concurrency/-private/external/task-instance/executor.js?:285:42)
    at TaskInstanceExecutor.handleResolvedContinueValue (webpack://solomon-website/./node_modules/ember-concurrency/-private/external/task-instance/executor.js?:149:27)
    at TaskInstanceExecutor.proceedSync (webpack://solomon-website/./node_modules/ember-concurrency/-private/external/task-instance/executor.js?:112:12)
    at eval (webpack://solomon-website/./node_modules/ember-concurrency/-private/external/task-instance/executor.js?:99:31)
    at invokeWithOnError (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:360:1)
    at Queue.flush (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:241:1)
    at DeferredActionQueues.flush (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:447:1)
    at Backburner._end (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:999:1)
    at Backburner.end (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:729:1)
    at Backburner._runExpiredTimers (/var/folders/cp/mp10cjhd1xdf8wg5gk7s9g500000gn/T/broccoli-65417B5xDdFci2l2P/out-586-packager_runner_embroider_webpack/assets/backburner.js:1136:1)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)

@alexlafroscia, as the author of Transition, how would you feel about adding (or reviewing a PR to add) some guarding for Fastboot? Is that appropriate or should it be for addon consumers to work that out?