diff --git a/README.md b/README.md
index 4d03eca934..7d0af8ac2e 100644
--- a/README.md
+++ b/README.md
@@ -36,7 +36,7 @@ Pull requests are encouraged and always welcome. [Pick an issue](https://github.
To install and work on Svelte locally:
```bash
-git clone git@github.com:sveltejs/svelte.git
+git clone https://github.com/sveltejs/svelte.git
cd svelte
npm install
```
diff --git a/src/compile/Component.ts b/src/compile/Component.ts
index 86b43c1b64..a429db41f6 100644
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -153,7 +153,7 @@ export default class Component {
if (compile_options.customElement) {
if (this.component_options.tag === undefined && compile_options.tag === undefined) {
- const svelteOptions = ast.html.children.find(child => child.name === 'svelte:options');
+ const svelteOptions = ast.html.children.find(child => child.name === 'svelte:options') || { start: 0, end: 0 };
this.warn(svelteOptions, {
code: 'custom-element-no-tag',
message: `No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. . To hide this warning, use `
diff --git a/test/custom-elements/samples/no-svelte-options/_config.js b/test/custom-elements/samples/no-svelte-options/_config.js
new file mode 100644
index 0000000000..e45582a127
--- /dev/null
+++ b/test/custom-elements/samples/no-svelte-options/_config.js
@@ -0,0 +1,17 @@
+export default {
+ warnings: [{
+ code: "custom-element-no-tag",
+ message: "No custom element 'tag' option was specified. To automatically register a custom element, specify a name with a hyphen in it, e.g. . To hide this warning, use ",
+ pos: 0,
+ start: {
+ character: 0,
+ column: 0,
+ line: 1
+ },
+ end: {
+ character: 0,
+ column: 0,
+ line: 1
+ }
+ }]
+};
diff --git a/test/custom-elements/samples/no-svelte-options/main.svelte b/test/custom-elements/samples/no-svelte-options/main.svelte
new file mode 100644
index 0000000000..538dc970e9
--- /dev/null
+++ b/test/custom-elements/samples/no-svelte-options/main.svelte
@@ -0,0 +1,5 @@
+
+
+Hello {name}!
diff --git a/test/custom-elements/samples/no-svelte-options/test.js b/test/custom-elements/samples/no-svelte-options/test.js
new file mode 100644
index 0000000000..c77f035088
--- /dev/null
+++ b/test/custom-elements/samples/no-svelte-options/test.js
@@ -0,0 +1,12 @@
+import * as assert from 'assert';
+import CustomElement from './main.svelte';
+
+export default function (target) {
+ customElements.define('no-tag', CustomElement);
+ target.innerHTML = ``;
+
+ const el = target.querySelector('no-tag');
+ const h1 = el.shadowRoot.querySelector('h1');
+
+ assert.equal(h1.textContent, 'Hello world!');
+}