Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

fix #1324 Define selectedComponentProperty in the way it could be redefined #1411

Merged
merged 2 commits into from
Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/backend/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,13 @@ const selectedComponentPropertyKey = '$$el';

const noSelectedComponentWarningText = 'There is no component selected.';

Object.defineProperty(window, selectedComponentPropertyKey,
{ value: noSelectedComponentWarningText });
Object.defineProperty(
window, selectedComponentPropertyKey,
{
value: noSelectedComponentWarningText,
configurable: true
}
);

const messageHandler = (message: Message<any>) => {

Expand Down Expand Up @@ -442,7 +447,8 @@ export const consoleReference = (node: Node) => {
return ng.probe(node.nativeElement());
}
return null;
}
},
configurable: true
});
};

Expand Down