Skip to content

Commit 545e1f9

Browse files
committed
fix(max-pipe): Added null check
1 parent c01feaf commit 545e1f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-notifications",
3-
"version": "0.4.48",
3+
"version": "0.4.49",
44
"description": "An easy to use notification library for angular 2",
55
"repository": {
66
"type": "git",

src/max.pipe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {Pipe, PipeTransform} from '@angular/core';
33
@Pipe({name: 'max'})
44
export class MaxPipe implements PipeTransform {
55
transform(value: string, ...args: any[]): any {
6+
if (!value) return value;
7+
68
let allowed = args[0];
79
let received = value.length;
810

0 commit comments

Comments
 (0)