Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit f3e4678

Browse files
committed
Update modules/directives/codemirror/codemirror.js
Using MDN-documented version of type checking as per #303 discussion
1 parent 056177f commit f3e4678

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/directives/codemirror/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ angular.module('ui.directives').directive('uiCodemirror', ['ui.config', '$timeou
1212
link:function (scope, elm, attrs, ngModel) {
1313
var options, opts, onChange, deferCodeMirror, codeMirror;
1414

15-
if (elm[0].type !== 'textarea') {
15+
if (elm[0].tagName.toLowerCase() == 'textarea') {
1616
throw new Error('uiCodemirror3 can only be applied to a textarea element');
1717
}
1818

0 commit comments

Comments
 (0)