Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Unnecessary object creation. #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/ui-ace.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,19 @@ angular.module('ui.ace', [])
}

// advanced options
var key, obj;
var key;
if (angular.isDefined(opts.advanced)) {
for (key in opts.advanced) {
// create a javascript object with the key and value
obj = { name: key, value: opts.advanced[key] };
// try to assign the option to the ace editor
acee.setOption(obj.name, obj.value);
acee.setOption(key, opts.advanced[key]);
}
}

// advanced options for the renderer
if (angular.isDefined(opts.rendererOptions)) {
for (key in opts.rendererOptions) {
// create a javascript object with the key and value
obj = { name: key, value: opts.rendererOptions[key] };
// try to assign the option to the ace editor
acee.renderer.setOption(obj.name, obj.value);
acee.renderer.setOption(key, opts.rendererOptions[key]);
}
}

Expand Down