瀏覽代碼

Updated statement to use typeName property

Jordan Kintzle 4 年之前
父節點
當前提交
15df00d6de
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/src/2D/controls/toggleButton.ts

+ 1 - 1
gui/src/2D/controls/toggleButton.ts

@@ -123,7 +123,7 @@ export class ToggleButton extends Rectangle {
             // If this toggle button has a group, set other toggle buttons in the group to inactive.
             this._host.executeOnAllControls((control) => {
                 // Check for control type ToggleButton
-                if ((<any>control)._getTypeName === "ToggleButton") {
+                if (control.typeName === "ToggleButton") {
                     // Don't do anything to this toggle button
                     if (control === this) {
                         return;