ember-cli-simple-store
Advanced tools
+1
-20
@@ -76,3 +76,3 @@ import Ember from "ember"; | ||
| } | ||
| return this._findByIdComputed(type, options); | ||
| return this._findById(type, options); | ||
| }, | ||
@@ -83,14 +83,2 @@ findOne: function(type) { | ||
| }, | ||
| _findByIdComputed: function(type, id) { | ||
| var actualId = this._parseAndTransformId(id); | ||
| return Ember.ObjectProxy.extend({ | ||
| content: function() { | ||
| var filter_value = this.get("filter_value"); | ||
| return this.get("source").filterBy("id", filter_value).objectAt(0); | ||
| }.property("source.[]") | ||
| }).create({ | ||
| filter_value: actualId, | ||
| source: this._findAll(type) | ||
| }); | ||
| }, | ||
| _findById: function(type, id) { | ||
@@ -129,9 +117,2 @@ var identityMap = identityMapForType(type, this); | ||
| }); | ||
| }, | ||
| _parseAndTransformId: function(id) { | ||
| var numberId = parseInt(id, 10); | ||
| if (numberId && numberId.toString().length === id.toString().length) { | ||
| return numberId; | ||
| } | ||
| return id; | ||
| } | ||
@@ -138,0 +119,0 @@ }); |
+1
-1
| { | ||
| "name": "ember-cli-simple-store", | ||
| "version": "0.8.5", | ||
| "version": "0.9.0", | ||
| "description": "ember-cli addon that provides a simple identity map for ember.js web applications", | ||
@@ -5,0 +5,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
-100%16164
-4.13%10
-9.09%208
-8.37%