summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ThemeEditor.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ThemeEditor.php b/src/ThemeEditor.php
index 194b59d..60ae997 100644
--- a/src/ThemeEditor.php
+++ b/src/ThemeEditor.php
@@ -40,7 +40,7 @@ class ThemeEditor
* @return array
*/
public function codeEditorSettings($settings, $args) {
- if (strpos($args['file'], '.twig') !== false) {
+ if (isset($args['file']) && strpos($args['file'], '.twig') !== false) {
$settings['codemirror']['mode'] = ['name' => 'twig', 'base' => 'text/html'];
}