fix(napi): compile issue without compat mode

This commit is contained in:
LongYinan 2021-12-22 09:33:40 +08:00
parent fa0fe87448
commit 87d1821e73
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
2 changed files with 6 additions and 3 deletions
crates/napi/src/bindgen_runtime

View file

@ -88,8 +88,11 @@ unsafe impl<K, V> Sync for PersistedSingleThreadHashMap<K, V> {}
lazy_static! {
static ref MODULE_REGISTER_CALLBACK: ModuleRegisterCallback = Default::default();
static ref MODULE_CLASS_PROPERTIES: ModuleClassProperty = Default::default();
// compatibility for #[module_exports]
#[cfg(feature = "compat-mode")]
}
#[cfg(feature = "compat-mode")]
// compatibility for #[module_exports]
lazy_static! {
static ref MODULE_EXPORTS: PersistedSingleThreadVec<ModuleExportsCallback> = Default::default();
}