mirror of https://github.com/sveltejs/svelte
				
				
				
			Merge branch 'master' of https://github.com/almaz-khan/svelte into almaz-khan-master
	
		
	
				
					
				
			
						commit
						13b1a80691
					
				@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					/* generated by Svelte vX.Y.Z */
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
						SvelteComponent,
 | 
				
			||||||
 | 
						attr,
 | 
				
			||||||
 | 
						detach,
 | 
				
			||||||
 | 
						element,
 | 
				
			||||||
 | 
						empty,
 | 
				
			||||||
 | 
						init,
 | 
				
			||||||
 | 
						insert,
 | 
				
			||||||
 | 
						noop,
 | 
				
			||||||
 | 
						safe_not_equal
 | 
				
			||||||
 | 
					} from "svelte/internal";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// (7:0) {#if (item.divider && item.divider.includes(1))}
 | 
				
			||||||
 | 
					function create_if_block(ctx) {
 | 
				
			||||||
 | 
						var div;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return {
 | 
				
			||||||
 | 
							c() {
 | 
				
			||||||
 | 
								div = element("div");
 | 
				
			||||||
 | 
								attr(div, "class", "divider");
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m(target, anchor) {
 | 
				
			||||||
 | 
								insert(target, div, anchor);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							d(detaching) {
 | 
				
			||||||
 | 
								if (detaching) {
 | 
				
			||||||
 | 
									detach(div);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function create_fragment(ctx) {
 | 
				
			||||||
 | 
						var show_if = (ctx.item.divider && ctx.item.divider.includes(1)), if_block_anchor;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						var if_block = (show_if) && create_if_block(ctx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return {
 | 
				
			||||||
 | 
							c() {
 | 
				
			||||||
 | 
								if (if_block) if_block.c();
 | 
				
			||||||
 | 
								if_block_anchor = empty();
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							m(target, anchor) {
 | 
				
			||||||
 | 
								if (if_block) if_block.m(target, anchor);
 | 
				
			||||||
 | 
								insert(target, if_block_anchor, anchor);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							p(changed, ctx) {
 | 
				
			||||||
 | 
								if (show_if) {
 | 
				
			||||||
 | 
									if (!if_block) {
 | 
				
			||||||
 | 
										if_block = create_if_block(ctx);
 | 
				
			||||||
 | 
										if_block.c();
 | 
				
			||||||
 | 
										if_block.m(if_block_anchor.parentNode, if_block_anchor);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								} else if (if_block) {
 | 
				
			||||||
 | 
									if_block.d(1);
 | 
				
			||||||
 | 
									if_block = null;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							i: noop,
 | 
				
			||||||
 | 
							o: noop,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							d(detaching) {
 | 
				
			||||||
 | 
								if (if_block) if_block.d(detaching);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (detaching) {
 | 
				
			||||||
 | 
									detach(if_block_anchor);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function instance($$self) {
 | 
				
			||||||
 | 
						let item = {
 | 
				
			||||||
 | 
							divider: [1]
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return { item };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Component extends SvelteComponent {
 | 
				
			||||||
 | 
						constructor(options) {
 | 
				
			||||||
 | 
							super();
 | 
				
			||||||
 | 
							init(this, options, instance, create_fragment, safe_not_equal, []);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default Component;
 | 
				
			||||||
@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					<script>
 | 
				
			||||||
 | 
						let item = {
 | 
				
			||||||
 | 
							divider: [1]
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{#if (item.divider && item.divider.includes(1))}
 | 
				
			||||||
 | 
					<div class="divider"></div>
 | 
				
			||||||
 | 
					{/if}
 | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue