I’m building a small web app in Halogen and I just wrapped a little bit of Javascript to close a Bootstrap modal. Javascript:
exports.hide = modalId => {
$('#'+modalId).modal("hide");
}
Purescript:
module App.Modal where
import Data.Unit (Unit)
import Effect (Effect)
foreign import hide :: String -> Effect Unit
Calling this in handleAction
using H.liftEffect (hide foo)
works - the modal closes. However, a few seconds after that, I get this error on the console:
Uncaught TypeError: eff is not a function
at runSync (index.js:1613)
at _run (index.js:1613)
at index.js:1613
at drain (index.js:1613)
at Object.enqueue (index.js:1613)
at Object.run (index.js:1613)
at __do (index.js:1613)
at index.js:1613
at index.js:1613
at mbEmit (index.js:1613)
I’m not sure if this is related to my code. It doesn’t happen if I don’t open/close the modal at all.
What does the error tell me? I don’t even have the word eff
in my code. The traceback is to Data.Map.Internal
. It’s really confusing me.
I can provide more sample code, but I cannot publish the whole repository.