Sha256: 1a1065fdba13ed80862e64e0362a1b0c358efef44ffcb71a4f7d503a18637e2e

Contents?: true

Size: 299 Bytes

Versions: 4

Compression:

Stored size: 299 Bytes

Contents

import ErrorModal from './error_modal'

document.addEventListener('turbo:frame-missing', async (e) => {
  e.preventDefault()

  const response = e.detail.response
  const title = `${response.status} (${response.statusText})`
  response.text().then(content => ErrorModal.show({ title, content }))
})

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.10.1 frontend/js/core/turbo_errors.js
trestle-0.10.0 frontend/js/core/turbo_errors.js
trestle-0.10.0.pre2 frontend/js/core/turbo_errors.js
trestle-0.10.0.pre frontend/js/core/turbo_errors.js