From 4f1b67b67e72a6bd152782f7661ce11118ac71a5 Mon Sep 17 00:00:00 2001 From: Stefan Hans Schonert Date: Sun, 19 Apr 2015 21:12:39 +0200 Subject: [PATCH] Check if option attribute is defined Instead of checking the attribute value, check if the attribute is set --- angular-contenteditable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-contenteditable.js b/angular-contenteditable.js index 49b59ee..508e63a 100644 --- a/angular-contenteditable.js +++ b/angular-contenteditable.js @@ -23,7 +23,7 @@ angular.module('contenteditable', []) 'moveCaretToEndOnChange', ], function(opt) { var o = attrs[opt] - opts[opt] = o && o !== 'false' + opts[opt] = attrs.hasOwnProperty(opt) && o !== 'false' }) // view -> model