Crash during script startup

Opus double-crashed while initializing a script; probably caused by trying to store a JS object in a script variable (line 97).

Two crashes, each with two crash logs.

Crash log ID: 513

CommandWatchFolderForCollection.js.txt

If you want to store js objects you need to convert them to json strings and then parse them to read them back.
If js object contains Opus objects such as vectors or maps, you need to do stringify "manually" to handle these objects.
Examples exist in my CommonLogger script in buttons/scripts sections.

We'll add some checks so that doing that doesn't crash.

(But to make it actually work, you need to serialise them to JSON and back, or similar, like PassThePeas suggests. The change just prevents the crash.)