summaryrefslogtreecommitdiffstats
path: root/apps/samples/vrml
diff options
context:
space:
mode:
Diffstat (limited to 'apps/samples/vrml')
-rw-r--r--apps/samples/vrml/viewer.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/samples/vrml/viewer.js b/apps/samples/vrml/viewer.js
index 18b3a85..ed62047 100644
--- a/apps/samples/vrml/viewer.js
+++ b/apps/samples/vrml/viewer.js
@@ -39,11 +39,13 @@ function VRMLViewer(element, params) {
this.resRoot = "";
// copy over values from constructor arguments
- for (var param in params) {
- if (self.hasOwnProperty(param))
- self[param] = params[param];
+ if (params) {
+ for (var param in params) {
+ if (self.hasOwnProperty(param))
+ self[param] = params[param];
+ }
}
-
+
// normalize parameters
// make sure server url begins with protocol and does *not* ends in /