wordcraft icon indicating copy to clipboard operation
wordcraft copied to clipboard

Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new'

Open ArunkumarRamanan opened this issue 2 years ago • 0 comments

Issue Description: Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new'

Error Details:

Uncaught (in promise) TypeError: Class constructor helperOperation cannot be invoked without 'new'
    at of.<anonymous> (operations_service.ts:237:23)
    at Generator.next (<anonymous>)
    at rewrite_sentence_operation.ts:64:3
    at new Promise (<anonymous>)
    at rf (rewrite_sentence_operation.ts:64:3)
    at of.startOperation (operations_service.ts:214:15)
    at ah.__onClickHelper (operation_controls.ts:88:38)
    at ah.<anonymous> (text_input_control.ts:122:20)
    at la.handleEvent (lit-html.js:6:7113)
(anonymous) @ operations_service.ts:237
(anonymous) @ rewrite_sentence_operation.ts:64
rf @ rewrite_sentence_operation.ts:64
startOperation @ operations_service.ts:214
(anonymous) @ operation_controls.ts:88
(anonymous) @ text_input_control.ts:122
handleEvent @ lit-html.js:6

Steps to Reproduce:

  1. Enable TerserPlugin optimization minimization in the webpack configuration.
  2. Use the "suggest rewrite" and "get prompt suggestions" features while the optimization is enabled.
  3. Observe the browser console for the error.

Expected Behavior: The application should function correctly even with TerserPlugin optimization enabled and the "suggest rewrite" and "get prompt suggestions" features should not result in a TypeError.

Additional Information:

  • Version of PAIR-code/wordcraft used: (main branch)
  • Browser and version: (e.g., Chrome latest, Edge latest)
  • Operating System: (e.g., Windows 11)

ArunkumarRamanan avatar Aug 10 '23 14:08 ArunkumarRamanan