diff --git a/bower.json b/bower.json index 1c4e9ce..88e1075 100644 --- a/bower.json +++ b/bower.json @@ -2,7 +2,7 @@ "name": "sifter", "keywords": ["search","filter","sift","data","results","match","sort","autocomplete"], "description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.", - "version": "0.5.2", + "version": "0.5.3", "license": "Apache License, Version 2.0", "readmeFilename": "README.md", "repository": { diff --git a/package.json b/package.json index 9d7de86..8f00017 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "autocomplete" ], "description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.", - "version": "0.5.2", + "version": "0.5.3", "license": "Apache-2.0", "author": "Brian Reavis ", "main": "./sifter.js", diff --git a/sifter.js b/sifter.js index 1302081..31adec6 100644 --- a/sifter.js +++ b/sifter.js @@ -1,6 +1,6 @@ /** * sifter.js - * Copyright (c) 2013-2017 Brian Reavis & contributors + * Copyright (c) 2013 Brian Reavis & contributors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -421,11 +421,11 @@ * @return {Object} The resolved property value */ var getattr = function(obj, name, nesting) { - if (!obj || !name) return; - if (!nesting) return obj[name]; - var names = name.split("."); - while(names.length && (obj = obj[names.shift()])); - return obj; + if (!obj || !name) return; + if (!nesting) return obj[name]; + var names = name.split("."); + while(names.length && (obj = obj[names.shift()])); + return obj; }; var trim = function(str) {