Skip to content

Commit 2dfc83f

Browse files
committed
Fixes merge.
1 parent 9388e2d commit 2dfc83f

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/Element.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ public function __construct($value = null) {
2121
$parent_class = get_parent_class(get_called_class());
2222
if ($parent_class && $parent_class !== 'Locker\XApi\Atom') {
2323
$parent_instance = new $parent_class;
24-
$this->props = array_merge($parent_instance->props, $this->props);
25-
$this->required_props = array_merge($parent_instance->required_props, $this->required_props);
26-
$this->default_props = array_merge($parent_instance->default_props, $this->default_props);
24+
$this->props = array_unique(
25+
array_merge($parent_instance->props, $this->props)
26+
);
27+
$this->required_props = array_unique(
28+
array_merge($parent_instance->required_props, $this->required_props)
29+
);
30+
$this->default_props = array_unique(
31+
array_merge($parent_instance->default_props, $this->default_props)
32+
);
2733
}
2834
$this->known_props = array_keys($this->props);
2935

0 commit comments

Comments
 (0)