diff --git a/src/SEOManager.php b/src/SEOManager.php
index 82f42b9..0741226 100644
--- a/src/SEOManager.php
+++ b/src/SEOManager.php
@@ -195,7 +195,7 @@ class SEOManager
{
$tag ??= $key;
- $this->tags[$tag] = $tag;
+ $this->tags[$key] = $tag;
return $this;
}
diff --git a/tests/Pest/ManagerTest.php b/tests/Pest/ManagerTest.php
index 50840b2..f404c9b 100644
--- a/tests/Pest/ManagerTest.php
+++ b/tests/Pest/ManagerTest.php
@@ -99,7 +99,9 @@ test('raw tags can be overridden', function () {
seo()->rawTag('foo', '');
seo()->rawTag('foo', '');
- expect(meta())->toContain('');
+ expect(meta())
+ ->not()->toContain('')
+ ->toContain('');
});
test('canonical url is not included by default', function () {