File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
tests/integration/components Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -134,9 +134,7 @@ Semantic.BaseMixin = Ember.Mixin.create({
134134
135135 areAttrValuesEqual ( attrName , attrValue , moduleValue ) {
136136 return attrValue === moduleValue ||
137- this . _stringCompare ( attrValue ) === moduleValue ||
138- attrValue === this . _stringCompare ( moduleValue ) ||
139- this . _stringCompare ( attrValue ) === this . _stringCompare ( moduleValue ) ||
137+ this . _stringCompareIfPossible ( attrValue ) === this . _stringCompareIfPossible ( moduleValue ) ||
140138 Ember . isEqual ( attrValue , moduleValue ) ;
141139 } ,
142140
@@ -146,6 +144,7 @@ Semantic.BaseMixin = Ember.Mixin.create({
146144 if ( module ) {
147145 return module . apply ( this . getSemanticScope ( ) , arguments ) ;
148146 }
147+ Ember . Logger . warn ( "The execute method was called, but the Semantic-UI module didn't exist." ) ;
149148 } ,
150149
151150 actions : {
@@ -230,17 +229,20 @@ Semantic.BaseMixin = Ember.Mixin.create({
230229 } ;
231230 } ,
232231
233- _stringCompare ( value ) {
232+ _stringCompareIfPossible ( value ) {
233+ // If its undefined or null, compare on null
234234 if ( value == null ) {
235235 return null ;
236236 }
237+ // We should only compare string values on primitive types
237238 switch ( typeof value ) {
238239 case "string" :
239240 return value ;
240241 case "boolean" :
241242 case "number" :
242243 return value . toString ( ) ;
243244 default :
245+ // Don't convert to string, otherwise it would be "[Object]"
244246 return value ;
245247 }
246248 } ,
Original file line number Diff line number Diff line change 11import Ember from 'ember' ;
22
33const isPromise = function ( maybePromise ) {
4- if ( Ember . PromiseProxyMixin . detect ( maybePromise ) ) {
5- return true ;
6- }
7-
8- if ( maybePromise instanceof Ember . RSVP . Promise ) {
9- return true ;
10- }
11-
12- if ( maybePromise != null && typeof maybePromise . then === 'function' ) {
4+ if ( maybePromise != null && typeof maybePromise . then === 'function' ) {
135 return true ;
146 }
157 return false ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ test('it renders', function(assert) {
99 assert . expect ( 1 ) ;
1010
1111 this . render ( hbs `
12- {{#ui-search url="/search"}}
12+ {{#ui-search apiSettings=(hash url="/search") }}
1313 <input class="prompt" type="text" placeholder="Common passwords...">
1414 <div class="results"></div>
1515 {{/ui-search}}
You can’t perform that action at this time.
0 commit comments