Skip to content

Commit

Permalink
feat(update-method): throw error when swal.update() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
zenflow authored and limonte committed Mar 23, 2019
1 parent e1d5767 commit e442747
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom'
import { mounts } from './mounts'

const noop = () => {}
const error = message => new Error(`sweetalert2-react-content: ${message}`)

export default function withReactContent(ParentSwal) {
return class extends ParentSwal {
Expand Down Expand Up @@ -49,5 +50,10 @@ export default function withReactContent(ParentSwal) {

return super._main(params)
}
update() {
throw error(
'Swal.update() is not yet supported. See https://github.com/sweetalert2/sweetalert2-react-content/issues/73',
)
}
}
}

0 comments on commit e442747

Please sign in to comment.