All files / src/app/shared util.ts

100% Statements 2/2
100% Branches 0/0
100% Functions 1/1
100% Lines 2/2
1 2 3 4 5 6 7 8 9          1x 1x    
 
/**
 * 过滤掉多余的错误提示
 * https://github.com/angular/angular-cli/issues/889#
 */
export function parseResponse(response: any) {
  return JSON.parse(response.replace(/}Error.*/, '}'));
}