Fix setting of esversion in nrjavascript worker

This commit is contained in:
Nick O'Leary 2020-09-16 23:21:52 +01:00
parent aaf134b1c5
commit 19726cf428
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -76,7 +76,7 @@ oop.inherits(NRJavaScriptWorker, Mirror);
(function() {
this.setOptions = function(options) {
this.options = options || {
this.options = {
// undef: true,
// unused: true,
esversion: 9,
@ -95,8 +95,14 @@ oop.inherits(NRJavaScriptWorker, Mirror);
globalstrict: true,
sub: true,
asi: true
};
if (options) {
for (var opt in options) {
if (options.hasOwnProperty(opt)) {
this.options[opt] = options.opt;
}
}
}
this.doc.getValue() && this.deferredUpdate.schedule(100);
};