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 { 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({
|
@Component({
|
||||||
selector: 'app-ability-card',
|
selector: 'app-ability-card',
|
||||||
@ -15,7 +14,11 @@ export class AbilityCardComponent implements OnInit {
|
|||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {
|
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.ability.skills.sort((a, b) => (a.name > b.name ? 1 : -1));
|
||||||
|
}
|
||||||
this.changeColors();
|
this.changeColors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user