Skip to content

Commit

Permalink
Merge pull request #122 from QiRaining/master.ps.error
Browse files Browse the repository at this point in the history
[FIX]Cannot read property 'indexOf' of null
  • Loading branch information
tolbkni authored Sep 26, 2016
2 parents 69453e9 + 9e35417 commit 8c12464
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ts/primaryStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,10 @@ module MPrimaryStorage {

return true;
} else if (this.type == 'SharedMountPoint' || this.type == 'IscsiFileSystemBackendPrimaryStorage' || this.type == 'LocalStorage' && Utils.notNullnotUndefined(this.url)) {
if (this.url.indexOf('/') != 0) {
return false;
if (!!this.url) {
if (this.url.indexOf('/') != 0) {
return false;
}
}

return true;
Expand Down
6 changes: 4 additions & 2 deletions zstack_dashboard/static/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11199,8 +11199,10 @@ var MPrimaryStorage;
return true;
}
else if (this.type == 'SharedMountPoint' || this.type == 'IscsiFileSystemBackendPrimaryStorage' || this.type == 'LocalStorage' && Utils.notNullnotUndefined(this.url)) {
if (this.url.indexOf('/') != 0) {
return false;
if (!!this.url) {
if (this.url.indexOf('/') != 0) {
return false;
}
}
return true;
}
Expand Down

0 comments on commit 8c12464

Please sign in to comment.