typescript version update; nicer fix of possible typescript error
This commit is contained in:
parent
642e57bf74
commit
06158a50ec
@ -26,7 +26,7 @@
|
||||
"mssql": "^3.3.0",
|
||||
"reflect-metadata": "^0.1.10",
|
||||
"typeorm": "0.0.10",
|
||||
"typescript": "^2.3.2",
|
||||
"typescript": "^2.3.3",
|
||||
"yargs": "^7.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -15,9 +15,8 @@ export class MssqlDriver extends AbstractDriver {
|
||||
console.error(`Table ${entity.EntityName} has no PK.`)
|
||||
return;
|
||||
}
|
||||
let pIndex = primaryIndex //typescript error? pIndex:IndexInfo; primaryIndex:IndexInfo|undefined
|
||||
entity.Columns.forEach(col => {
|
||||
if (pIndex.columns.some(cIndex => cIndex.name == col.name)) col.isPrimary = true
|
||||
if (primaryIndex!.columns.some(cIndex => cIndex.name == col.name)) col.isPrimary = true
|
||||
})
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user