summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/node/src/node_expression.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/node/src/node_expression.cpp b/platform/node/src/node_expression.cpp
index 81d5c74767..7e59847da9 100644
--- a/platform/node/src/node_expression.cpp
+++ b/platform/node/src/node_expression.cpp
@@ -42,7 +42,8 @@ type::Type parseType(v8::Local<v8::Object> type) {
{"color", type::Color},
{"value", type::Value},
{"formatted", type::Formatted},
- {"number-format", type::String}};
+ {"number-format", type::String},
+ {"resolvedImage", type::Image}};
v8::Local<v8::Value> v8kind = Nan::Get(type, Nan::New("kind").ToLocalChecked()).ToLocalChecked();
std::string kind(*v8::String::Utf8Value(v8kind));
@@ -220,6 +221,8 @@ struct ToValue {
return scope.Escape(result);
}
+
+ v8::Local<v8::Value> operator()(const Image& image) { return toJS(image.toValue()); }
};
v8::Local<v8::Value> toJS(const Value& value) {