fix skill list null error
This commit is contained in:
parent
766b323042
commit
538c58c1e4
@ -1,6 +1,5 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { AbilityViewModel } from '../../../types/viewmodels/ability-viewmodels/AbilityViewModel';
|
||||
import {CharacterStatsViewModel} from "../../../types/viewmodels/character-viewmodels/CharacterStatsViewModel";
|
||||
import {CharacterStatsViewModel} from '../../../types/viewmodels/character-viewmodels/CharacterStatsViewModel';
|
||||
|
||||
@Component({
|
||||
selector: 'app-ability-card',
|
||||
@ -15,7 +14,11 @@ export class AbilityCardComponent implements OnInit {
|
||||
constructor() {}
|
||||
|
||||
ngOnInit() {
|
||||
debugger
|
||||
console.log(this.ability.skills);
|
||||
if (this.ability.skills != null) {
|
||||
this.ability.skills.sort((a, b) => (a.name > b.name ? 1 : -1));
|
||||
}
|
||||
this.changeColors();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user