workaround for broken Object.create(null) on old opera
fixes https://github.com/ajaxorg/ace-builds/issues/13
This commit is contained in:
parent
4c1497fc29
commit
214c3a9b5d
1 changed files with 5 additions and 0 deletions
|
|
@ -212,6 +212,11 @@ var TextHighlightRules = function() {
|
||||||
for (var i = list.length; i--; )
|
for (var i = list.length; i--; )
|
||||||
keywords[list[i]] = className;
|
keywords[list[i]] = className;
|
||||||
});
|
});
|
||||||
|
// in old versions of opera keywords["__proto__"] sets prototype
|
||||||
|
// even on objects with __proto__=null
|
||||||
|
if (Object.getPrototypeOf(keywords)) {
|
||||||
|
keywords.__proto__ = null;
|
||||||
|
}
|
||||||
this.$keywordList = Object.keys(keywords);
|
this.$keywordList = Object.keys(keywords);
|
||||||
map = null;
|
map = null;
|
||||||
return ignoreCase
|
return ignoreCase
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue