Ticket #1412 (closed defect: fixed)
Utilities.js assumes existence of window global
| Reported by: | cdent | Owned by: | JeremyRuston |
|---|---|---|---|
| Priority: | undefined | Milestone: | 2.6.3 |
| Component: | core | Version: | |
| Severity: | undefined | Keywords: | |
| Cc: |
Description (last modified by cdent) (diff)
The Utilities.js file, of the files used to build TiddlyWiki, assumes that there is a global window variable. This is not true in some situations:
- unmocked, independent unit tests
- server-side javascript
It would be best if the last lines of the files were guarded with a test for window being defined and being a dict. Here's the original code.
if(!window.console) {
console = {tiddlywiki:true,log:function(message) {displayMessage(message);}};
}
Change History
Note: See
TracTickets for help on using
tickets.
