mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
keep target and anchor inside mount method
This commit is contained in:
parent
7654437d7b
commit
9463f5fe54
@ -59,13 +59,10 @@ export default function generate ( parsed, source, options ) {
|
||||
|
||||
renderers.push( deindent`
|
||||
function ${fragment.name} ( ${fragment.params}, component ) {
|
||||
var target, anchor;
|
||||
${fragment.initStatements.join( '\n\n' )}
|
||||
|
||||
return {
|
||||
mount: function ( _target, _anchor ) {
|
||||
target = _target;
|
||||
anchor = _anchor;
|
||||
mount: function ( target, anchor ) {
|
||||
${fragment.mountStatements.join( '\n\n' )}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user