Skip to content

Commit

Permalink
Suppress ATTR_FALSE_VALUE warning for rtl.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Jun 2, 2024
1 parent b9fa726 commit b030808
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ describe("Creation", () => {
Fixture.firstGrandChild,
);
const vm = creationWrapper.vm as any;
console.log(creationWrapper);
expect(vm.rightToLeft).toBeTruthy();
expect(vm.interactionWidth).toBe(119);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export default {
return Math.abs(this.distance2(this.from, this.to) - safeOffset) - 1;
},
rightToLeft() {
return this.distance2(this.from, this.to) < 0;
// to suppress ATTR_FALSE_VALUE warning
// Details: https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html
return this.distance2(this.from, this.to) < 0 ? true : null;
},
signature() {
return this.creation.SignatureText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ export default {
return dist + fragmentOff - indent;
},
rightToLeft: function () {
return this.distance2(this.from, this.to) < 0;
// to suppress ATTR_FALSE_VALUE warning
// Details: https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html
return this.distance2(this.from, this.to) < 0 ? true : null;
},
isCurrent: function () {
return this.message?.isCurrent(this.cursor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export default {
: this.distance(this.source, this.from);
},
rightToLeft: function () {
return this.distance(this.target, this.source) < 0;
// to suppress ATTR_FALSE_VALUE warning
// Details: https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html
return this.distance(this.target, this.source) < 0 ? true : null;
},
signature: function () {
return this.asyncMessage?.content()?.getFormattedText();
Expand Down

0 comments on commit b030808

Please sign in to comment.