ember-cli-selectize
Advanced tools
@@ -240,5 +240,5 @@ import Ember from 'ember'; | ||
| generalOptions.forEach(function(option) { | ||
| options[option] = this.get(option) || options[option]; | ||
| }, this); | ||
| generalOptions.forEach((option) => { | ||
| options[option] = this.getWithDefault(option, options[option]); | ||
| }); | ||
@@ -245,0 +245,0 @@ options = this._mergeSortField(options); |
+19
-6
@@ -9,8 +9,21 @@ /* jshint node: true */ | ||
| var host = this._findHost(); | ||
| // If the addon has the _findHost() method (in ember-cli >= 2.7.0), we'll just | ||
| // use that. | ||
| if (typeof this._findHost === 'function') { | ||
| app = this._findHost(); | ||
| } | ||
| // Otherwise, we'll use this implementation borrowed from the _findHost() | ||
| // method in ember-cli. | ||
| // Keep iterating upward until we don't have a grandparent. | ||
| // Has to do this grandparent check because at some point we hit the project. | ||
| var current = this; | ||
| do { | ||
| app = current.app || app; | ||
| } while (current.parent.parent && (current = current.parent)); | ||
| //default theme name is 'default' | ||
| var options = { theme: 'default' }; | ||
| if (host.options && host.options['ember-cli-selectize']) { | ||
| options = host.options['ember-cli-selectize']; | ||
| if (app.options && app.options['ember-cli-selectize']) { | ||
| options = app.options['ember-cli-selectize']; | ||
| } | ||
@@ -20,10 +33,10 @@ | ||
| //import theme based on options | ||
| if (options.theme) { | ||
| this.import(host.bowerDirectory + '/selectize/dist/css/selectize.' + options.theme + '.css'); | ||
| if (app.theme) { | ||
| app.import(app.bowerDirectory + '/selectize/dist/css/selectize.' + options.theme + '.css'); | ||
| } | ||
| //import javascript | ||
| this.import(host.bowerDirectory + '/selectize/dist/js/standalone/selectize.js'); | ||
| app.import(app.bowerDirectory + '/selectize/dist/js/standalone/selectize.js'); | ||
| } | ||
| } | ||
| }; |
+1
-1
| { | ||
| "name": "ember-cli-selectize", | ||
| "version": "0.5.7", | ||
| "version": "0.5.8", | ||
| "description": "An Ember and Selectize integration, packaged as an Ember-cli addon.", | ||
@@ -5,0 +5,0 @@ "directories": { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
43583
1.21%792
1.54%