From ff95f2a9ab308557b6f53d085e8cdb95dc0e09f1 Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Fri, 7 Oct 2016 12:14:29 +0200 Subject: [PATCH] typescript: Fix potential nil buffer-file-name --- layers/+lang/typescript/packages.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layers/+lang/typescript/packages.el b/layers/+lang/typescript/packages.el index e9ebd70aa..15d6c2dd7 100644 --- a/layers/+lang/typescript/packages.el +++ b/layers/+lang/typescript/packages.el @@ -64,7 +64,8 @@ ;; FIXME -- this is not good! (add-hook 'web-mode-hook (lambda () - (when (string-equal "tsx" (file-name-extension buffer-file-name)) + (when (and (buffer-file-name) + (string-equal "tsx" (file-name-extension (buffer-file-name)))) (tide-setup) (flycheck-mode +1) (setq flycheck-check-syntax-automatically '(save mode-enabled))