diff --git a/src/client.js b/src/client.js index cec91725..3e97abae 100644 --- a/src/client.js +++ b/src/client.js @@ -1,5 +1,5 @@ import * as sapper from '@sapper/app'; -sapper.start({ - target: document.querySelector('#sapper') -}); \ No newline at end of file +const target = document.querySelector('#sapper'); +if (!target) throw new Error("Missing #sapper element"); +sapper.start({ target });