Skip to content

Commit 224b0c1

Browse files
committed
followed suggestions of Copilot review.
1 parent 2bb4a51 commit 224b0c1

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/common/lib/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* -
1414
*
1515
* @ToDo:
16-
* -
16+
* - Resolve circular dependency between helpers.ts and pig-metaclasses.ts (IIdentifiable)
1717
*/
1818

19-
import { IIdentifiable } from '../schema/pig/ts/pig-metaclasses';
19+
import type { IIdentifiable } from '../schema/pig/ts/pig-metaclasses';
2020
import { DEF } from './definitions';
2121

2222
/**

src/common/lib/revision-tracker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export class RevisionTracker {
6565
static updateWithRevision<T extends IIdentifiable>(newElement: T, existingElement: T): T {
6666
const newRevision = this.makeRevision();
6767
const priorRev: string[] = [];
68-
68+
69+
// priorRevision shall remember the revision of the existing element. Usually there is one entry and two in case of a merge.
6970
if (existingElement.revision) {
7071
priorRev.push(existingElement.revision);
7172
}

src/common/schema/pig/ts/pig-metaclasses.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ abstract class AnElement extends Identifiable implements IAnElement {
895895

896896
// Add the property with the key as its hasClass reference
897897
if (itemTypeValue === PigItemType.aProperty /* || !itemTypeValue*/) {
898-
if (item.value || item.composes) {
898+
if (item.value !== undefined || item.composes) {
899899
configurables.push({
900900
itemType: PigItemType.aProperty,
901901
hasClass: key,
@@ -914,7 +914,7 @@ abstract class AnElement extends Identifiable implements IAnElement {
914914
const itemTypeValue = val.itemType /* || (val[nameItemType] && extractId(val[nameItemType])) */;
915915

916916
if (itemTypeValue === PigItemType.aProperty /* || !itemTypeValue */) {
917-
if (val.value || val.composes) {
917+
if (val.value !== undefined || val.composes) {
918918
configurables.push({
919919
itemType: PigItemType.aProperty,
920920
hasClass: key,
@@ -926,7 +926,7 @@ abstract class AnElement extends Identifiable implements IAnElement {
926926
}
927927
}
928928
// Handle primitive values (string, number, boolean) - create simple properties
929-
else if (val && (typeof val === 'string' || typeof val === 'number' || typeof val === 'boolean')) {
929+
else if (val !== undefined && val !== null && (typeof val === 'string' || typeof val === 'number' || typeof val === 'boolean')) {
930930
configurables.push({
931931
itemType: PigItemType.aProperty,
932932
hasClass: key,

src/plugins/export/ttl/export-ttl.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ import { LIB, LOG } from '../../../common/lib/helpers';
109109
options: {
110110
skipShapes: false, // Will be negated to addShapes: true
111111
skipHostedOntologies: false, // Will be negated to addHostedOntologies: true
112-
addExplicitSubTypes: false, // Passed as-is (false = don't add)
112+
addExplicitTypeToAllClasses: false, // Passed as-is (false = don't add)
113113
addItemTypes: false // Passed as-is (false = don't add, must be ticked to add)
114114
},
115115
rules: {

0 commit comments

Comments
 (0)