Skip to content

Commit

Permalink
fix(Audio): restore extension after filename
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Sep 13, 2023
1 parent 789acea commit fb020d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class Audio {

constructor(props: AudioConstructorProps) {
this.filename = props.filename
if (!this.filename.toLowerCase().endsWith('.wav')) {
this.filename += '.wav'
}
this.isNative = props.isNative ?? true
this.sourcePath = props.sourcePath
this.type = props.type ?? 'sfx'
Expand Down

0 comments on commit fb020d6

Please sign in to comment.