Skip to content

Commit 9a9a1fc

Browse files
committed
Fix custom values
1 parent 2de318e commit 9a9a1fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Importer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ public function setMeta(array $meta): self
108108

109109
public function getCustomValues($key = null)
110110
{
111-
if ($key && ! empty($this->custom_values[$key])) {
112-
return $this->custom_values[$key];
111+
if ($key) {
112+
return $this->custom_values[$key] ?? '';
113113
}
114114

115115
return $this->custom_values;
@@ -154,7 +154,7 @@ protected function getFieldValue(array $row, string $mapping, string $attribute)
154154
return $row[$mapping];
155155
} elseif (Str::startsWith($mapping, 'meta')) {
156156
return $this->getMeta(Str::remove('@meta.', "@{$mapping}"));
157-
} elseif (Str::startsWith($mapping, 'custom')) {
157+
} elseif ($mapping === 'custom') {
158158
return $this->getCustomValues($attribute);
159159
}
160160
}

0 commit comments

Comments
 (0)