Skip to content

Commit e288131

Browse files
committed
shadow var removed
1 parent caf8e47 commit e288131

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/controls/sitePicker/SitePicker.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -240,21 +240,21 @@ export const SitePicker: React.FunctionComponent<ISitePickerProps> = (props: Rea
240240
promise = getAllSites(context, mode !== 'site', limitToCurrentSiteCollection);
241241
}
242242

243-
promise.then(sites => {
244-
const copy = orderBy(sites, [propOrderBy || 'title'], [isDesc ? 'desc' : 'asc']);
243+
promise.then(newSites => {
244+
const copy = orderBy(newSites, [propOrderBy || 'title'], [isDesc ? 'desc' : 'asc']);
245245
setAllSites(copy);
246246
setIsLoading(false);
247247
});
248248

249249
}, [context, isLoading, mode, limitToCurrentSiteCollection]);
250250

251251
React.useEffect(() => {
252-
setAllSites(sites => {
253-
if (!sites) {
254-
return sites;
252+
setAllSites(s => {
253+
if (!s) {
254+
return s;
255255
}
256256

257-
const copy = orderBy(sites, [propOrderBy || 'title'], [isDesc ? 'desc' : 'asc']);
257+
const copy = orderBy(s, [propOrderBy || 'title'], [isDesc ? 'desc' : 'asc']);
258258
return copy;
259259
});
260260
}, [propOrderBy, isDesc]);

0 commit comments

Comments
 (0)