Skip to content

Commit

Permalink
fix(报错): 属性空值判断
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Oct 13, 2024
1 parent ecdc2e9 commit 380f5b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/attributeTextFloat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 秦少卫
* @Date: 2024-06-10 17:52:40
* @LastEditors: 秦少卫
* @LastEditTime: 2024-10-07 17:37:53
* @LastEditTime: 2024-10-13 17:08:59
* @Description: 小数点下标上标
-->

Expand Down Expand Up @@ -40,7 +40,7 @@ const getObjectAttr = (e) => {
const activeObject = canvasEditor.canvas.getActiveObject();
// 不是当前obj,跳过
if (e && e.target && e.target !== activeObject) return;
if (activeObject && isMatchType && activeObject.text.includes('.')) {
if (activeObject && isMatchType && activeObject?.text?.includes('.')) {
baseAttr.verticalAlign = activeObject.get('verticalAlign');
}
};
Expand Down

0 comments on commit 380f5b2

Please sign in to comment.