Skip to content

Commit

Permalink
Fix conditional.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Apr 21, 2012
1 parent f0a5dec commit 82f003c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/jsonld.js
Expand Up @@ -791,13 +791,13 @@ jsonld.compareNormalized = function(n1, n2) {
* @return the value.
*/
jsonld.getContextValue = function(ctx, key, type) {
var rval = null;

// return null for invalid key
if(key === null) {
return null;
return rval;
}

var rval = null;

// get default language
if(type === '@language' && (type in ctx)) {
rval = ctx[type];
Expand All @@ -812,7 +812,7 @@ jsonld.getContextValue = function(ctx, key, type) {
rval = entry;
}
// return entry value for type
if(type in entry) {
else if(type in entry) {
rval = entry[type];
}
}
Expand Down

0 comments on commit 82f003c

Please sign in to comment.