ExtensionEngine / tailor

Content authoring platform
MIT License
31 stars 10 forks source link

Error is thrown when handleStatics method doesn't return a promise #676

Closed ikovac closed 3 years ago

ikovac commented 3 years ago

I'm submitting a...

Failure Information (for bugs)

Error resolveStatics(...).then is not a function is thrown in the revision.controller.js (line 23) when content-element/util.js handleStatics doesn't return a promise.

For example:

function handleStatics(element, defaultHandler, generalHandler) {
    return element;
}

Steps to Reproduce

  1. To reproduce this error create a custom content element or edit the existing one by adding util.js file with custom handleStatics handler
  2. Edit handleStatics function to return non-promise value (for example: return element;)
  3. Create newly added (or edited) content element inside activity
  4. Edit content element a few times
  5. Go to the history page and choose revision related to your content element
  6. By this point, you should receive a blank history screen and the error described above