diff --git a/src/HtmlField.php b/src/HtmlField.php
index d937947..0f88bb0 100644
--- a/src/HtmlField.php
+++ b/src/HtmlField.php
@@ -549,9 +549,12 @@ protected function configOptions(
foreach ($files as $file) {
$filename = basename($file);
- if ($filename !== 'Default.json') {
- $options[$filename] = $includeExtensions ? $filename : pathinfo($file, PATHINFO_BASENAME);
+ // Exclude `default` files if $includeDefault is true, to prevent confusion between e.g. "Default" and "Default.json"
+ if ($includeDefault && strtolower(pathinfo($filename, PATHINFO_FILENAME)) === 'default') {
+ continue;
}
+
+ $options[$filename] = $includeExtensions ? $filename : pathinfo($file, PATHINFO_BASENAME);
}
}