-
-
Notifications
You must be signed in to change notification settings - Fork 571
Greetings that use callback function runs multiple times #855
Copy link
Copy link
Closed
Labels
Bugresolvedif issue is resolved, it will be open until merge with masterif issue is resolved, it will be open until merge with master
Description
Issue summary
When you use greetings as a function can call callback function. The greetings is rendered multiple times. 2 times on init and on every resize. Found by @leif in #853
Expected behavior
It should render once
Actual behavior
it renders multiple times
Steps to reproduce
Use this code:
const term = $('body').terminal({}, {
greetings(cb) {
cb(`This Terminal has ${this.cols()} cols`);
}
});Browser and OS
All
- Write code
- Write unit tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugresolvedif issue is resolved, it will be open until merge with masterif issue is resolved, it will be open until merge with master