From 87324298186bcab2f6eb04141b5f46a854a64cb2 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 11 Apr 2007 23:01:48 +0000 Subject: r22179: Store resource id along with the object itself to be able to return it as "number" type. This fixes a small problem with resource set method returning id of type "number" whereas find method was returning id of type "string". rafal (This used to be commit c3805aeb5e64aa66c0dfceb89efdf60bfb2134e8) --- services/resources.esp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'services') diff --git a/services/resources.esp b/services/resources.esp index e7fd164c34..b5c4bd3b3d 100644 --- a/services/resources.esp +++ b/services/resources.esp @@ -52,6 +52,7 @@ function _resourcesCreate() /* Save the resource and its type */ r.resource = resource; r.type = type; + r.id = this.resourceList.id; /* Add this resource to the list */ this.resourceList[this.resourceList.id] = r; @@ -110,7 +111,7 @@ function _resourcesCreate() if (r.type == type) { /* Yup, this is the one they want. */ - return resourceId; + return r.id; } } } -- cgit