Skip to content

Commit

Permalink
chore: Merge branch 'master' of https://github.com/giscafer/leek-fund
Browse files Browse the repository at this point in the history
  • Loading branch information
giscafer committed Nov 14, 2020
2 parents 0c467d8 + e424530 commit 7478d40
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/explorer/stockProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ export class StockProvider implements TreeDataProvider<LeekTreeItem> {
getChildren(element?: LeekTreeItem | undefined): LeekTreeItem[] | Thenable<LeekTreeItem[]> {
if (!element) {
// Root view
return this.getRootNodes();
} else {
const stockCodes = LeekFundConfig.getConfig('leek-fund.stocks') || [];
const resultPromise = this.service.getData(stockCodes, this.order);
// console.log(element.id);
return this.service.getData(stockCodes, this.order).then(() => {
return this.getRootNodes();
});
} else {
const resultPromise = Promise.resolve(this.service.stockList || []);
switch (
element.id // First-level
) {
Expand Down

0 comments on commit 7478d40

Please sign in to comment.