Skip to content

Commit

Permalink
fix: lodash import (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinvardar authored Oct 28, 2024
1 parent e2cdec4 commit 5b6c5df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/print-html.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { generate } from 'astring';
import _, { isArray } from 'lodash';
import * as _ from 'lodash';
import { walk } from 'estree-walker';
import { AST } from 'svelte/compiler';
import { DefaultPrinterIdentOptions, PrinterIdentOptions } from './index.js';
Expand Down Expand Up @@ -105,7 +105,7 @@ class ElementPrinter extends BaseHtmlNodePrinter {
return;
}

if (isArray(attribute.value)) {
if (_.isArray(attribute.value)) {
const [value] = attribute.value;

if (value.type === 'Text') {
Expand Down Expand Up @@ -146,7 +146,7 @@ class ElementPrinter extends BaseHtmlNodePrinter {
if (attribute.value === true) {
write(` style:${attribute.name}`);
} else {
if (isArray(attribute.value)) {
if (_.isArray(attribute.value)) {
const [value] = attribute.value;
if (value.type === 'Text') {
write(` style:${attribute.name}="${value.data}"`);
Expand Down

0 comments on commit 5b6c5df

Please sign in to comment.