Skip to content

Commit

Permalink
Tweak return value of detectChanges
Browse files Browse the repository at this point in the history
  • Loading branch information
ssciolla committed Jan 4, 2021
1 parent 6bbbb7c commit c698316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/assets/src/changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const propertyMap: HumanReadableMap = {
'assignee': 'host'
}

function detectChanges<T extends Base>(versOne: T, versTwo: T, propsToWatch: (keyof T)[]): string {
function detectChanges<T extends Base>(versOne: T, versTwo: T, propsToWatch: (keyof T)[]): string | undefined {
for (const property of propsToWatch) {
let valueOne = versOne[property] as T[keyof T] | string;
let valueTwo = versTwo[property] as T[keyof T] | string;
Expand All @@ -36,7 +36,7 @@ function detectChanges<T extends Base>(versOne: T, versTwo: T, propsToWatch: (ke
return `The ${propName} changed from "${valueOne}" to "${valueTwo}".`;
}
}
return '';
return;
}


Expand Down

0 comments on commit c698316

Please sign in to comment.