Update utils.ts

Some libraries such as https://github.com/hperrin/svelte-material-ui depend on the "get_slot_context" being exported, but it was not any more, having them break on build.
pull/6975/head
gtasm 5 years ago committed by GitHub
parent 51459874fe
commit 2add9cf7d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -89,7 +89,7 @@ export function create_slot(definition, ctx, $$scope, fn) {
} }
} }
function get_slot_context(definition, ctx, $$scope, fn) { export function get_slot_context(definition, ctx, $$scope, fn) {
return definition[1] && fn return definition[1] && fn
? assign($$scope.ctx.slice(), definition[1](fn(ctx))) ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))
: $$scope.ctx; : $$scope.ctx;

Loading…
Cancel
Save