You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/generators/nodes/Element.ts
+8-8
Original file line number
Diff line number
Diff line change
@@ -516,16 +516,16 @@ export default class Element extends Node {
516
516
});
517
517
`);
518
518
519
-
520
-
block.builders.hydrate.addBlock(deindent`
521
-
if (${handlerName}.teardown) {
522
-
${handlerName}.destroy = ${handlerName}.teardown;
523
-
${generator.options.dev&&`console.warn("Return 'destroy()' from custom event handlers. Returning 'teardown()' has been deprecated and will be unsupported in Svelte 2");`}
524
-
}
525
-
`);
519
+
if(generator.options.dev){
520
+
block.builders.hydrate.addBlock(deindent`
521
+
if (${handlerName}.teardown) {
522
+
console.warn("Return 'destroy()' from custom event handlers. Returning 'teardown()' has been deprecated and will be unsupported in Svelte 2");
0 commit comments