diff --git a/ember_debug/object-inspector.js b/ember_debug/object-inspector.js index a2e36b6a71..113ae4da9b 100644 --- a/ember_debug/object-inspector.js +++ b/ember_debug/object-inspector.js @@ -20,13 +20,22 @@ function inspectValue(value) { } else if (isComputed(value)) { string = ""; return { type: "type-descriptor", inspect: string, computed: true }; - } else if (value instanceof Descriptor) { + } else if (isDescriptor(value)) { return { type: "type-descriptor", inspect: value.toString(), computed: true }; } else { return { type: "type-" + typeOf(value), inspect: inspect(value) }; } } +function isDescriptor(value) { + // Ember < 1.11 + if (Descriptor !== undefined) { + return value instanceof Descriptor; + } + // Ember >= 1.11 + return value && typeof value === 'object' && value.isDescriptor; +} + function inspect(value) { if (typeof value === 'function') { return "function() { ... }";