From 2fb8f9c6ce0aa43c6e2326e5d904aeb972a9cf41 Mon Sep 17 00:00:00 2001 From: zhangyaochun Date: Fri, 12 Jun 2015 14:30:26 +0800 Subject: [PATCH] fix(highlight filter): bug in highlight if number type --- src/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index efc7a5b9f..b28399add 100644 --- a/src/common.js +++ b/src/common.js @@ -132,7 +132,7 @@ var uis = angular.module('ui.select', []) } return function(matchItem, query) { - return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; + return query && matchItem ? String(matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; }; })