[core] Eliminate setProperty & co.
This commit is contained in:
@@ -822,7 +822,7 @@ void NodeMap::SetLayoutProperty(const Nan::FunctionCallbackInfo<v8::Value>& info
|
||||
return Nan::ThrowTypeError("Second argument must be a string");
|
||||
}
|
||||
|
||||
mbgl::optional<Error> error = setLayoutProperty(*layer, *Nan::Utf8String(info[1]), Convertible(info[2]));
|
||||
mbgl::optional<Error> error = layer->setLayoutProperty(*Nan::Utf8String(info[1]), Convertible(info[2]));
|
||||
if (error) {
|
||||
return Nan::ThrowTypeError(error->message.c_str());
|
||||
}
|
||||
@@ -854,7 +854,7 @@ void NodeMap::SetPaintProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
|
||||
return Nan::ThrowTypeError("Second argument must be a string");
|
||||
}
|
||||
|
||||
mbgl::optional<Error> error = setPaintProperty(*layer, *Nan::Utf8String(info[1]), Convertible(info[2]));
|
||||
mbgl::optional<Error> error = layer->setPaintProperty(*Nan::Utf8String(info[1]), Convertible(info[2]));
|
||||
if (error) {
|
||||
return Nan::ThrowTypeError(error->message.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user