Skip to content

Commit 98b0056

Browse files
committed
Address comments
1 parent 058fccf commit 98b0056

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

packages/database/src/core/snap/IndexMap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ export class IndexMap {
7070
const sortedMap = safeGet(this.indexes_, indexKey);
7171
if (!sortedMap) throw new Error('No index defined for ' + indexKey);
7272

73-
if (sortedMap === fallbackObject) {
73+
if (sortedMap instanceof SortedMap) {
74+
return sortedMap;
75+
} else {
7476
// The index exists, but it falls back to just name comparison. Return null so that the calling code uses the
7577
// regular child map
7678
return null;
77-
} else {
78-
return sortedMap as SortedMap<NamedNode, Node>;
7979
}
8080
}
8181

packages/database/src/core/snap/Node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ export interface Node {
116116
forEachChild(index: Index, action: (a: string, b: Node) => void): any;
117117

118118
/**
119-
* @param {boolean=} exportFormat True for export format (also wire protocol format).
120-
* @return {*} Value of this node as JSON.
119+
* @param exportFormat True for export format (also wire protocol format).
120+
* @return Value of this node as JSON.
121121
*/
122122
val(exportFormat?: boolean): any;
123123

packages/polyfill/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ import 'promise-polyfill/lib/polyfill';
2424
// ES Stable
2525
import 'core-js/features/array/find';
2626
import 'core-js/features/array/find-index';
27+
import 'core-js/features/array/from';
2728
import 'core-js/features/object/assign';
2829
import 'core-js/features/object/entries';
2930
import 'core-js/features/object/values';
3031
import 'core-js/features/string/starts-with';
3132
import 'core-js/features/string/repeat';
3233
import 'core-js/features/symbol';
3334
import 'core-js/features/symbol/iterator';
35+
import 'core-js/features/map';
36+
import 'core-js/features/set';

0 commit comments

Comments
 (0)