Permalink
Browse files

Stop using extended method

I used `Ember.String.fmt` instead of `String#fmt`.
Because the latter may be undefined.
  • Loading branch information...
1 parent 902e87f commit af03ccc9121da5d3a08a99abf159ddeeefb115b3 @tricknotes tricknotes committed Mar 7, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 packages/ember-data/lib/adapters/fixture_adapter.js
@@ -2,7 +2,7 @@ require("ember-data/core");
require("ember-data/system/adapter");
require('ember-data/serializers/fixture_serializer');
-var get = Ember.get;
+var get = Ember.get, fmt = Ember.String.fmt;
/**
`DS.FixtureAdapter` is an adapter that loads records from memory.
@@ -30,7 +30,7 @@ DS.FixtureAdapter = DS.Adapter.extend({
var fixtures = Ember.A(type.FIXTURES);
return fixtures.map(function(fixture){
if(!fixture.id){
- throw new Error('the id property must be defined for fixture %@'.fmt(fixture));
+ throw new Error(fmt('the id property must be defined for fixture %@', [fixture]));
}
fixture.id = fixture.id + '';
return fixture;

0 comments on commit af03ccc

Please sign in to comment.