From 74b74deb144c6094d038a9f4d63af6c334a489c0 Mon Sep 17 00:00:00 2001 From: Jim Smart Date: Mon, 5 Dec 2016 23:15:12 +0000 Subject: [PATCH] Fix for failing PrefixMap.Remove() and TermMap.Remove() Parameter name in method signature did not match variable names used within the method. --- lib/Profile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Profile.js b/lib/Profile.js index 737b6c0..2c2233b 100644 --- a/lib/Profile.js +++ b/lib/Profile.js @@ -23,7 +23,7 @@ api.PrefixMap.prototype.set = function(prefix, uri){ if(prefix.slice(-1)==":") prefix=prefix.slice(0, -1); this[prefix] = uri; } -api.PrefixMap.prototype.remove = function(toResolve){ +api.PrefixMap.prototype.remove = function(prefix){ if(Object.hasOwnProperty.call(this, prefix)) delete this[prefix]; } api.PrefixMap.prototype.resolve = function(curie){ @@ -63,7 +63,7 @@ api.TermMap.prototype.set = function(term, uri){ this[term] = uri; } api.TermMap.prototype.remove = function(term){ - if(Object.hasOwnProperty.call(this, prefix)) delete this[prefix]; + if(Object.hasOwnProperty.call(this, term)) delete this[term]; } api.TermMap.prototype.resolve = function(term){ if(Object.hasOwnProperty.call(this, term)) return this[term];