Skip to content

Commit

Permalink
fix: testResult.response can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Jul 6, 2022
1 parent 7b3db52 commit 7316f96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 162 deletions.
161 changes: 1 addition & 160 deletions src/workbench/browser/angular.json
Original file line number Diff line number Diff line change
@@ -1,160 +1 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": { "analytics": false, "defaultCollection": "@angular-eslint/schematics" },
"version": 1,
"newProjectRoot": "projects",
"projects": {
"eoapi": {
"root": "",
"i18n": {
"sourceLocale": { "code": "en" },
"locales": { "zh": { "translation": "src/locale/messages.zh.xlf" } }
},
"sourceRoot": "src",
"projectType": "application",
"schematics": { "@schematics/angular:application": { "strict": true } },
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"localize": true,
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/icon.ico",
"src/assets",
{
"glob": "**/*",
"input": "../../../node_modules/@ant-design/icons-angular/src/inline-svg/",
"output": "/assets/"
}
],
"styles": [
{ "input": "src/assets/theme/classic_forest.scss", "bundleName": "classic_forest", "inject": false },
"src/styles.scss",
"src/assets/theme/antd.less",
"src/assets/font/iconfont.css",
"src/ng1/index.css"
],
"scripts": [
"src/ng1/lib/angular/angular.js",
"src/ng1/app.module.js",
"src/ng1/component/select-default.js",
"src/ng1/component/sort-and-filter.js",
"src/ng1/component/auto-complete.js",
"src/ng1/component/list-block.js",
"src/ng1/directive/get-dom-length.directive.js",
"src/ng1/directive/drop-down-menu.directive.js",
"src/ng1/directive/sort.directive.js",
"src/ng1/directive/drop-change-space.directive.js",
"src/ng1/directive/inner-html.directive.js",
"src/ng1/directive/insert-html.directive.js",
"src/ng1/directive/copy-common.directive.js"
],
"customWebpackConfig": { "path": "./angular.webpack.js", "replaceDuplicatePlugins": true },
"allowedCommonJsDependencies": ["brace", "qs", "rxjs"]
},
"configurations": {
"dev": {
"optimization": false,
"outputHashing": "none",
"sourceMap": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.dev.ts" }
]
},
"web": {
"optimization": false,
"outputHashing": "none",
"sourceMap": true,
"namedChunks": false,
"localize": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.web.ts" }
]
},
"webCn": {
"optimization": false,
"outputHashing": "none",
"sourceMap": true,
"namedChunks": false,
"localize": ["zh"],
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.web.ts" }
]
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{ "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" }
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": { "browserTarget": "eoapi:build" },
"configurations": {
"dev": { "browserTarget": "eoapi:build:dev" },
"web": { "browserTarget": "eoapi:build:web" },
"webCn": { "browserTarget": "eoapi:build:webCn" },
"production": { "browserTarget": "eoapi:build:production" }
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "browserTarget": "eoapi:build" }
},
"test": {
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills-test.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"scripts": [],
"styles": ["src/styles.scss"],
"assets": ["src/assets"],
"customWebpackConfig": { "path": "./angular.webpack.js", "replaceDuplicatePlugins": true }
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": { "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] }
}
}
},
"eoapi-e2e": {
"root": "e2e",
"projectType": "application",
"architect": {
"lint": { "builder": "@angular-eslint/builder:lint", "options": { "lintFilePatterns": ["e2e/**/*.ts"] } }
}
}
},
"defaultProject": "eoapi",
"schematics": {
"@schematics/angular:component": { "prefix": "eo", "style": "scss" },
"@schematics/angular:directive": { "prefix": "eo" }
}
}
{"$schema":"./node_modules/@angular/cli/lib/config/schema.json","cli":{"analytics":false,"defaultCollection":"@angular-eslint/schematics"},"version":1,"newProjectRoot":"projects","projects":{"eoapi":{"root":"","i18n":{"sourceLocale":{"code":"en","baseHref":""},"locales":{"zh":{"translation":"src/locale/messages.zh.xlf","baseHref":""}}},"sourceRoot":"src","projectType":"application","schematics":{"@schematics/angular:application":{"strict":true}},"architect":{"build":{"builder":"@angular-builders/custom-webpack:browser","options":{"localize":true,"aot":true,"outputPath":"dist","index":"src/index.html","main":"src/main.ts","tsConfig":"src/tsconfig.app.json","polyfills":"src/polyfills.ts","assets":["src/icon.ico","src/assets",{"glob":"**/*","input":"../../../node_modules/@ant-design/icons-angular/src/inline-svg/","output":"/assets/"}],"styles":[{"input":"src/assets/theme/classic_forest.scss","bundleName":"classic_forest","inject":false},"src/styles.scss","src/assets/theme/antd.less","src/assets/font/iconfont.css","src/ng1/index.css"],"scripts":["src/ng1/lib/angular/angular.js","src/ng1/app.module.js","src/ng1/component/select-default.js","src/ng1/component/sort-and-filter.js","src/ng1/component/auto-complete.js","src/ng1/component/list-block.js","src/ng1/directive/get-dom-length.directive.js","src/ng1/directive/drop-down-menu.directive.js","src/ng1/directive/sort.directive.js","src/ng1/directive/drop-change-space.directive.js","src/ng1/directive/inner-html.directive.js","src/ng1/directive/insert-html.directive.js","src/ng1/directive/copy-common.directive.js"],"customWebpackConfig":{"path":"./angular.webpack.js","replaceDuplicatePlugins":true},"allowedCommonJsDependencies":["brace","qs","rxjs"]},"configurations":{"dev":{"optimization":false,"outputHashing":"none","sourceMap":true,"namedChunks":false,"extractLicenses":true,"vendorChunk":false,"buildOptimizer":false,"fileReplacements":[{"replace":"src/environments/environment.ts","with":"src/environments/environment.dev.ts"}]},"web":{"optimization":false,"outputHashing":"none","sourceMap":true,"namedChunks":false,"localize":false,"extractLicenses":true,"vendorChunk":false,"buildOptimizer":false,"fileReplacements":[{"replace":"src/environments/environment.ts","with":"src/environments/environment.web.ts"}]},"webCn":{"optimization":false,"outputHashing":"none","sourceMap":true,"namedChunks":false,"localize":["zh"],"extractLicenses":true,"vendorChunk":false,"buildOptimizer":false,"fileReplacements":[{"replace":"src/environments/environment.ts","with":"src/environments/environment.web.ts"}]},"production":{"optimization":true,"outputHashing":"all","sourceMap":false,"namedChunks":false,"extractLicenses":true,"vendorChunk":false,"buildOptimizer":true,"fileReplacements":[{"replace":"src/environments/environment.ts","with":"src/environments/environment.prod.ts"}]}}},"serve":{"builder":"@angular-builders/custom-webpack:dev-server","options":{"browserTarget":"eoapi:build"},"configurations":{"dev":{"browserTarget":"eoapi:build:dev"},"web":{"browserTarget":"eoapi:build:web"},"webCn":{"browserTarget":"eoapi:build:webCn"},"production":{"browserTarget":"eoapi:build:production"}}},"extract-i18n":{"builder":"@angular-devkit/build-angular:extract-i18n","options":{"browserTarget":"eoapi:build"}},"test":{"builder":"@angular-builders/custom-webpack:karma","options":{"main":"src/test.ts","polyfills":"src/polyfills-test.ts","tsConfig":"src/tsconfig.spec.json","karmaConfig":"src/karma.conf.js","scripts":[],"styles":["src/styles.scss"],"assets":["src/assets"],"customWebpackConfig":{"path":"./angular.webpack.js","replaceDuplicatePlugins":true}}},"lint":{"builder":"@angular-eslint/builder:lint","options":{"lintFilePatterns":["src/**/*.ts","src/**/*.html"]}}}},"eoapi-e2e":{"root":"e2e","projectType":"application","architect":{"lint":{"builder":"@angular-eslint/builder:lint","options":{"lintFilePatterns":["e2e/**/*.ts"]}}}}},"defaultProject":"eoapi","schematics":{"@schematics/angular:component":{"prefix":"eo","style":"scss"},"@schematics/angular:directive":{"prefix":"eo"}}}
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
<nz-tabset [nzTabBarStyle]="{ 'padding-left': '10px' }" [(nzSelectedIndex)]="tabIndexRes" [nzAnimated]="false"
class="mt10 response_container">
<nz-tab i18n-nzTitle nzTitle="Response">
<eo-api-test-result-response [model]="testResult.response"></eo-api-test-result-response>
<eo-api-test-result-response [model]="testResult?.response"></eo-api-test-result-response>
</nz-tab>
<div>
<nz-tab i18n-nzTitle nzTitle="Response Headers">
<eo-api-test-result-header [model]="testResult.response?.headers"></eo-api-test-result-header>
<eo-api-test-result-header [model]="testResult?.response?.headers"></eo-api-test-result-header>
</nz-tab>
</div>
<nz-tab i18n-nzTitle nzTitle="Body">
Expand Down

0 comments on commit 7316f96

Please sign in to comment.